Skip to content

Commit

Permalink
Fix collisions from PassServerEntityFilter detour (#141)
Browse files Browse the repository at this point in the history
  • Loading branch information
FortyTwoFortyTwo authored Jun 6, 2024
1 parent ab887db commit ee60fb8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions addons/sourcemod/scripting/scp_sf/dhooks.sp
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,8 @@ public MRESReturn Detour_PassServerEntityFilterPost(DHookReturn ret, DHookParam

if ((touch_is_player && pass_is_player) || (!touch_is_player && !pass_is_player))
{
return MRES_Ignored;
ret.Value = true;
return MRES_Supercede;
}

int entity = touch_is_player ? pass_ent : touch_ent;
Expand All @@ -561,7 +562,8 @@ public MRESReturn Detour_PassServerEntityFilterPost(DHookReturn ret, DHookParam

if (strncmp(classname, "func_door", sizeof(classname)) != 0 && strncmp(classname, "func_movelinear", sizeof(classname)) != 0)
{
return MRES_Ignored;
ret.Value = true;
return MRES_Supercede;
}

int client = touch_is_player ? touch_ent : pass_ent;
Expand Down

0 comments on commit ee60fb8

Please sign in to comment.