diff --git a/sourcemod/gamedata/collisionhook.txt b/sourcemod/gamedata/collisionhook.txt index 64f009e..132fce8 100644 --- a/sourcemod/gamedata/collisionhook.txt +++ b/sourcemod/gamedata/collisionhook.txt @@ -60,6 +60,8 @@ /* String: "RagdollImpact" -> 2 blocks down, , get sub, from Pickup_ForcePlayerToDropThisObject, Xref ->, go all the way up, */ "windows" "\x55\x8B\xEC\x56\x8B\x75\x0C\x57\x85\xF6\x74\x2A\x8B\x7D\x08" "windows64" "\x48\x89\x5C\x24\x08\x48\x89\x74\x24\x10\x57\x48\x83\xEC\x20\x48\x8B\xFA\x48\x8B\xF1\x48\x85\xD2\x0F\x84\x2A\x2A\x2A\x2A\x48\x3B\xCA" + "linux" "@_Z22PassServerEntityFilterPK13IHandleEntityS1_.part.0" + "linux64" "@_Z22PassServerEntityFilterPK13IHandleEntityS1_.part.0" } } } diff --git a/src/extension.cpp b/src/extension.cpp index bc64a3e..3011160 100644 --- a/src/extension.cpp +++ b/src/extension.cpp @@ -39,8 +39,13 @@ IForward *g_pPassFwd = NULL; int gSetCollisionSolverHookId, gShouldCollideHookId; - +#if defined(__linux__) && defined(__i386__) +CDetour* PassServerEntityFilterFuncDetour; +__attribute__((regparm(2))) bool (*PassServerEntityFilterFunc_Actual)(const IHandleEntity*, const IHandleEntity*); +__attribute__((regparm(2))) bool PassServerEntityFilterFunc(const IHandleEntity* pTouch, const IHandleEntity* pPass) +#else DETOUR_DECL_STATIC2( PassServerEntityFilterFunc, bool, const IHandleEntity *, pTouch, const IHandleEntity *, pPass ) +#endif { if ( g_pPassFwd->GetFunctionCount() == 0 ) return DETOUR_STATIC_CALL( PassServerEntityFilterFunc )( pTouch, pPass );