L L4D2node

GetAllChildren_r

0x006d8ed0 · 174 bytes · __regparm3

_ZL16GetAllChildren_rP11CBaseEntityR10CUtlVectorIS0_10CUtlMemoryIS0_iEE

Decompiled

undefined (2 params)

/* GetAllChildren_r(CBaseEntity*, CUtlVector<CBaseEntity*, CUtlMemory<CBaseEntity*, int> >&) */

void __regparm3 GetAllChildren_r(CBaseEntity *param_1,CUtlVector *param_2)

{
  uint uVar1;
  CBaseEntity *pCVar2;
  undefined *puVar3;
  CBaseEntity *local_20 [4];
  
  local_20[0] = param_1;
  while( true ) {
    if (local_20[0] == (CBaseEntity *)0x0) {
      return;
    }
    CUtlVector<CBaseEntity*,CUtlMemory<CBaseEntity*,int>>::InsertBefore
              ((CUtlVector<CBaseEntity*,CUtlMemory<CBaseEntity*,int>> *)param_2,
               *(int *)(param_2 + 0xc),local_20);
    uVar1 = *(uint *)(local_20[0] + 0x18c);
    pCVar2 = (CBaseEntity *)0x0;
    if (((uVar1 != 0xffffffff) &&
        (puVar3 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar3 != (undefined *)0xfffffffc)) &&
       (*(uint *)(puVar3 + 8) == uVar1 >> 0xc)) {
      pCVar2 = *(CBaseEntity **)(puVar3 + 4);
    }
    GetAllChildren_r(pCVar2,param_2);
    uVar1 = *(uint *)(local_20[0] + 400);
    if (uVar1 == 0xffffffff) {
      return;
    }
    puVar3 = g_pEntityList + (uVar1 & 0xfff) * 0x10;
    if (puVar3 == (undefined *)0xfffffffc) {
      return;
    }
    if (*(uint *)(puVar3 + 8) != uVar1 >> 0xc) break;
    local_20[0] = *(CBaseEntity **)(puVar3 + 4);
  }
  return;
}

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)