L L4D2node

CTerrorPlayer::ObjectCaps

0x00519c60 · 295 bytes · __thiscall

_ZN13CTerrorPlayer10ObjectCapsEv

Decompiled

undefined (1 param)

/* CTerrorPlayer::ObjectCaps() */

uint __thiscall CTerrorPlayer::ObjectCaps(CTerrorPlayer *this)

{
  char cVar1;
  uint uVar2;
  int iVar3;
  undefined *puVar4;
  
  cVar1 = IsPlayingDeathAnim(this);
  if ((cVar1 == '\0') && (cVar1 = (**(code **)(*(int *)this + 300))(this), cVar1 != '\0')) {
    iVar3 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
    cVar1 = IsASurvivorTeam(iVar3);
    if (cVar1 != '\0') {
      uVar2 = *(uint *)(this + 0x3e68);
      if ((((((uVar2 == 0xffffffff) ||
             (puVar4 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar4 == (undefined *)0xfffffffc))
            || (*(uint *)(puVar4 + 8) != uVar2 >> 0xc)) || (*(int *)(puVar4 + 4) == 0)) &&
          (((uVar2 = *(uint *)(this + 0x3e48), uVar2 == 0xffffffff ||
            (puVar4 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar4 == (undefined *)0xfffffffc)) ||
           ((*(uint *)(puVar4 + 8) != uVar2 >> 0xc || (*(int *)(puVar4 + 4) == 0)))))) &&
         ((((uVar2 = *(uint *)(this + 0x33c4), uVar2 == 0xffffffff ||
            (puVar4 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar4 == (undefined *)0xfffffffc)) ||
           ((*(uint *)(puVar4 + 8) != uVar2 >> 0xc ||
            ((*(int *)(puVar4 + 4) == 0 || (this[0x39f1] != (CTerrorPlayer)0x0)))))) &&
          (cVar1 = (**(code **)(*(int *)this + 0x7e8))(this), cVar1 != '\0')))) {
        uVar2 = CBaseEntity::ObjectCaps((CBaseEntity *)this);
        return uVar2 & 0xfffffffd | 0x20;
      }
      uVar2 = CBaseEntity::ObjectCaps((CBaseEntity *)this);
      return uVar2 & 0xfffffffd | 0x10;
    }
  }
  uVar2 = CBaseEntity::ObjectCaps((CBaseEntity *)this);
  return uVar2 & 0xfffffffd;
}

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)