L L4D2node

CTraceFilterAgainstEntityList::ShouldHitEntity

0x00792cd0 · 128 bytes · __cdecl

_ZN29CTraceFilterAgainstEntityList15ShouldHitEntityEP13IHandleEntityi

Decompiled

undefined (2 params)

/* CTraceFilterAgainstEntityList::ShouldHitEntity(IHandleEntity*, int) */

uint CTraceFilterAgainstEntityList::ShouldHitEntity(IHandleEntity *param_1,int param_2)

{
  int *piVar1;
  char cVar2;
  int iVar3;
  uint uVar4;
  
  iVar3 = *(int *)(param_1 + 0x14) + -1;
  if (-1 < iVar3) {
    piVar1 = *(int **)(*(int *)(param_1 + 8) + iVar3 * 4);
    while( true ) {
      if (piVar1 == (int *)param_2) {
        if (((param_1[4] != (IHandleEntity)0x0) &&
            (cVar2 = (**(code **)(*staticpropmgr + 8))(staticpropmgr,piVar1), cVar2 == '\0')) &&
           (piVar1 != (int *)0x0)) {
          uVar4 = (**(code **)(*piVar1 + 0x2c8))(piVar1);
          return (uVar4 >> 9 ^ 1) & 1;
        }
        return 1;
      }
      iVar3 = iVar3 + -1;
      if (iVar3 == -1) break;
      piVar1 = *(int **)(*(int *)(param_1 + 8) + iVar3 * 4);
    }
  }
  return 0;
}

SourceMod gamedata

paste into addons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)

Just a Signatures{} block, ready to drop into a gamedata file. Wire it up in your plugin however you like - SDKCall, DHooks, raw memory ops, or anything else.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)