Thread: CollisionHook
View Single Post
cravenge
Veteran Member
Join Date: Nov 2015
Location: Chocolate Factory
Old 02-16-2021 , 09:39   Re: CollisionHook
Reply With Quote #120

Quote:
Originally Posted by Crasher_3637 View Post
You can find it by searching "RagdollImpact" which will lead you to the "CBaseEntity::FireBullets" function. That function contains other strings you can reference but the "RagdollImpact" is the one closest to the function we'll need. A little below that string, you'll see a function called "Pickup_ForcePlayerToDropThisObject" (the function we need) which will only have two references. The second one will be the function "CTraceFilterMelee::ShouldHitEntity". When you look inside that function, you will see that it calls "PassServerEntityFilter" in the Linux binaries. In the Windows binaries, it'll be the 2nd subroutine that you'll see in an "if" statement.

Linux:
PHP Code:
v3 0;
  if ( (
unsigned __int8)StandardFilterRules(a2a3) )
  {
    if ( 
PassServerEntityFilter(a2, *((const IHandleEntity **)this 1))
      && !(*(
unsigned __int8 (__cdecl **)(intIHandleEntity *))(*(_DWORD *)staticpropmgr 8))(staticpropmgra2) )
    { 
Windows:
PHP Code:
if ( !(unsigned __int8)sub_1020B800(a2a3)
    || !(
unsigned __int8)sub_1020B760(a2, *(_DWORD *)(this 4)) 
I ran makesig.idc on "sub_1020B760" and got the same signature (minus the last wildcarded byte) as Spirit_12:
PHP Code:
Signature for sub_1020B760:
55 8B EC 57 8B 7D 0C 85 FF 75 
\
x55\x8B\xEC\x57\x8B\x7D\x0C\x85\xFF\x75\x2A 
This really helped me a lot. Thanks! By the way, how did you compare the functions? I'm using IDA and I couldn't see any feature that provided that.
cravenge is offline