L L4D2node

UnlinkAllChildren

0x006d8dc0 · 157 bytes · __cdecl

_Z17UnlinkAllChildrenP11CBaseEntity

Decompiled

undefined (1 param)

/* UnlinkAllChildren(CBaseEntity*) */

void UnlinkAllChildren(CBaseEntity *param_1)

{
  uint uVar1;
  CBaseEntity *pCVar2;
  CBaseEntity *pCVar3;
  undefined *puVar4;
  
  uVar1 = *(uint *)(param_1 + 0x18c);
  if (((uVar1 != 0xffffffff) &&
      (puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc)) &&
     (*(uint *)(puVar4 + 8) == uVar1 >> 0xc)) {
    pCVar3 = *(CBaseEntity **)(puVar4 + 4);
    while (pCVar3 != (CBaseEntity *)0x0) {
      uVar1 = *(uint *)(pCVar3 + 400);
      if (((uVar1 == 0xffffffff) ||
          (puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 == (undefined *)0xfffffffc)) ||
         (*(uint *)(puVar4 + 8) != uVar1 >> 0xc)) {
        UnlinkFromParent(pCVar3);
        return;
      }
      pCVar2 = *(CBaseEntity **)(puVar4 + 4);
      UnlinkFromParent(pCVar3);
      pCVar3 = pCVar2;
    }
  }
  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)