L L4D2node

CTraceFilterNoIncapacitated::ShouldHitEntity

0x00520e20 · 337 bytes · __thiscall

_ZN27CTraceFilterNoIncapacitated15ShouldHitEntityEP13IHandleEntityi

Decompiled

undefined (3 params)

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

undefined4 __thiscall
CTraceFilterNoIncapacitated::ShouldHitEntity
          (CTraceFilterNoIncapacitated *this,IHandleEntity *param_1,int param_2)

{
  uint uVar1;
  char cVar2;
  undefined4 uVar3;
  undefined4 uVar4;
  int iVar5;
  undefined *puVar6;
  CBaseEntity *this_00;
  
  uVar3 = CTraceFilterSimple::ShouldHitEntity((CTraceFilterSimple *)this,param_1,param_2);
  if ((char)uVar3 != '\0') {
    cVar2 = (**(code **)(*staticpropmgr + 8))(staticpropmgr,param_1);
    this_00 = (CBaseEntity *)0x0;
    if (cVar2 == '\0') {
      this_00 = (CBaseEntity *)param_1;
    }
    uVar4 = (**(code **)(*(int *)this_00 + 0x16c))(this_00);
    if ((char)uVar4 != '\0') {
      cVar2 = (**(code **)(*(int *)this_00 + 0x16c))(this_00);
      if (((((cVar2 == '\0') ||
            ((iVar5 = CBaseEntity::GetTeamNumber(this_00), iVar5 != 4 && (iVar5 != 2)))) ||
           (((uVar1 = *(uint *)(this_00 + 0x3e68), uVar1 != 0xffffffff &&
             (((puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc
               && (*(uint *)(puVar6 + 8) == uVar1 >> 0xc)) && (*(int *)(puVar6 + 4) != 0)))) ||
            (((uVar1 = *(uint *)(this_00 + 0x3e48), uVar1 != 0xffffffff &&
              (puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc))
             && ((*(uint *)(puVar6 + 8) == uVar1 >> 0xc && (*(int *)(puVar6 + 4) != 0)))))))) ||
          ((((uVar1 = *(uint *)(this_00 + 0x33c4), uVar1 != 0xffffffff &&
             (puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc))
            && (*(uint *)(puVar6 + 8) == uVar1 >> 0xc)) &&
           ((*(int *)(puVar6 + 4) != 0 && (this_00[0x39f1] == (CBaseEntity)0x0)))))) ||
         (cVar2 = (**(code **)(*(int *)this_00 + 0x7e8))(this_00), cVar2 == '\0')) {
        return uVar4;
      }
      uVar3 = 0;
    }
  }
  return uVar3;
}

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)