L L4D2node

CVoxelHash::EntityCount

0x001dca30 · 88 bytes · __thiscall

_ZN10CVoxelHash11EntityCountEv

Decompiled

undefined (1 param)

/* CVoxelHash::EntityCount() */

int __thiscall CVoxelHash::EntityCount(CVoxelHash *this)

{
  int iVar1;
  int iVar2;
  int iVar3;
  int iVar4;
  
  iVar3 = 0;
  iVar4 = 0;
  do {
    if (*(int *)(this + iVar4 * 8 + 0x10) != 0) {
      iVar2 = *(int *)(this + iVar4 * 8 + 0xc);
      do {
        if (iVar2 == 0) break;
        for (iVar1 = *(int *)(iVar2 + 4); iVar1 != 0; iVar1 = *(int *)(iVar1 + 8)) {
          iVar3 = iVar3 + 1;
        }
        iVar2 = *(int *)(iVar2 + 0xc);
      } while (*(int *)(this + iVar4 * 8 + 0xc) != iVar2);
    }
    iVar4 = iVar4 + 1;
    if (iVar4 == 0x200) {
      return iVar3;
    }
  } while( true );
}

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)