L L4D2node

CTraceFilterDoor::ShouldHitEntity

0x007fdec0 · 410 bytes · __thiscall

_ZN16CTraceFilterDoor15ShouldHitEntityEP13IHandleEntityi

Decompiled

undefined (3 params)

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

uint __thiscall
CTraceFilterDoor::ShouldHitEntity(CTraceFilterDoor *this,IHandleEntity *param_1,int param_2)

{
  int *piVar1;
  char cVar2;
  byte bVar3;
  uint uVar4;
  uint uVar5;
  undefined *puVar6;
  int iVar7;
  longdouble lVar8;
  int local_24;
  
  cVar2 = StandardFilterRules(param_1,param_2);
  if ((cVar2 == '\0') ||
     (bVar3 = PassServerEntityFilter(param_1,*(IHandleEntity **)(this + 0x18)), bVar3 == 0)) {
    return 0;
  }
  iVar7 = 0;
  if (0 < *(int *)(this + 0x10)) {
    do {
      cVar2 = PassServerEntityFilter(param_1,*(IHandleEntity **)(*(int *)(this + 4) + iVar7 * 4));
      if (cVar2 == '\0') {
        return 0;
      }
      iVar7 = iVar7 + 1;
    } while (iVar7 < *(int *)(this + 0x10));
  }
  uVar4 = (**(code **)(*staticpropmgr + 8))(staticpropmgr,param_1);
  if (((char)uVar4 == '\0') && (param_1 != (IHandleEntity *)0x0)) {
    local_24 = 0;
    uVar5 = *(uint *)(param_1 + 0x180);
    if ((uVar5 != 0xffffffff) &&
       ((puVar6 = g_pEntityList + (uVar5 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc &&
        (*(uint *)(puVar6 + 8) == uVar5 >> 0xc)))) {
      local_24 = *(int *)(puVar6 + 4);
    }
    if (*(int *)(this + 0x18) == local_24) {
      return uVar4;
    }
    iVar7 = (**(code **)(*(int *)param_1 + 0x144))(param_1);
    if (iVar7 != 0) {
      return uVar4;
    }
    cVar2 = (**(code **)(*(int *)param_1 + 0x4c))(param_1,*(undefined4 *)(this + 0x1c),param_2);
    if (cVar2 == '\0') {
      return uVar4;
    }
    uVar5 = (**(code **)(*g_pGameRules + 0x74))
                      (g_pGameRules,*(undefined4 *)(this + 0x1c),*(undefined4 *)(param_1 + 0x234));
    if ((char)uVar5 == '\0') {
      return uVar4;
    }
    if (param_1[0x186] == (IHandleEntity)0x6) {
      piVar1 = *(int **)(param_1 + 0x238);
      cVar2 = (**(code **)(*piVar1 + 0x2c))(piVar1);
      if ((cVar2 != '\0') &&
         (lVar8 = (longdouble)(**(code **)(*piVar1 + 0x78))(piVar1), (float)lVar8 < 32.0)) {
        return uVar4;
      }
      return uVar5;
    }
  }
  return (uint)bVar3;
}

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)