L L4D2node

CBaseEntity::GetRootMoveParent

0x0040ea80 · 144 bytes · __thiscall

_ZN11CBaseEntity17GetRootMoveParentEv

Decompiled

undefined (1 param)

/* CBaseEntity::GetRootMoveParent() */

CBaseEntity * __thiscall CBaseEntity::GetRootMoveParent(CBaseEntity *this)

{
  CBaseEntity *pCVar1;
  uint uVar2;
  undefined *puVar3;
  
  uVar2 = *(uint *)(this + 0x188);
  if ((((uVar2 != 0xffffffff) &&
       (puVar3 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar3 != (undefined *)0xfffffffc)) &&
      (*(uint *)(puVar3 + 8) == uVar2 >> 0xc)) &&
     ((pCVar1 = *(CBaseEntity **)(puVar3 + 4), pCVar1 != (CBaseEntity *)0x0 &&
      (uVar2 = *(uint *)(pCVar1 + 0x188), this = pCVar1, uVar2 != 0xffffffff)))) {
    while ((puVar3 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar3 != (undefined *)0xfffffffc &&
           ((*(uint *)(puVar3 + 8) == uVar2 >> 0xc &&
            (pCVar1 = *(CBaseEntity **)(puVar3 + 4), pCVar1 != (CBaseEntity *)0x0))))) {
      uVar2 = *(uint *)(pCVar1 + 0x188);
      this = pCVar1;
      if (uVar2 == 0xffffffff) {
        return pCVar1;
      }
    }
  }
  return this;
}

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)