L L4D2node

CBaseEntity::ObjectCaps

0x00609a50 · 185 bytes · __thiscall

_ZN11CBaseEntity10ObjectCapsEv

Decompiled

undefined (1 param)

/* CBaseEntity::ObjectCaps() */

uint __thiscall CBaseEntity::ObjectCaps(CBaseEntity *this)

{
  int *piVar1;
  char cVar2;
  int iVar3;
  uint uVar4;
  uint uVar5;
  undefined *puVar6;
  bool bVar7;
  
  bVar7 = false;
  iVar3 = GetModel(this);
  if (iVar3 != 0) {
    iVar3 = (**(code **)(*modelinfo + 0x2c))(modelinfo,iVar3);
    bVar7 = iVar3 == 1;
  }
  uVar5 = *(uint *)(this + 0x180);
  if ((((uVar5 != 0xffffffff) &&
       (puVar6 = g_pEntityList + (uVar5 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc)) &&
      (*(uint *)(puVar6 + 8) == uVar5 >> 0xc)) &&
     (piVar1 = *(int **)(puVar6 + 4), piVar1 != (int *)0x0)) {
    uVar4 = (**(code **)(*piVar1 + 0xa4))(piVar1);
    uVar5 = uVar4 & 0x10f2;
    if (bVar7) {
      uVar5 = uVar4 & 0x10f0;
    }
    cVar2 = (**(code **)(*piVar1 + 0x16c))(piVar1);
    if (cVar2 != '\0') {
      uVar5 = uVar5 & 0xfffffffd;
    }
    return uVar5;
  }
  return -(uint)!bVar7 & 2;
}

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)