L L4D2node

CBaseEntity::RecalcHasPlayerChildBit

0x0060e530 · 148 bytes · __thiscall

_ZN11CBaseEntity23RecalcHasPlayerChildBitEv

Decompiled

undefined (1 param)

/* CBaseEntity::RecalcHasPlayerChildBit() */

void __thiscall CBaseEntity::RecalcHasPlayerChildBit(CBaseEntity *this)

{
  uint uVar1;
  CBaseEntity *pCVar2;
  char cVar3;
  undefined *puVar4;
  
  cVar3 = (**(code **)(*(int *)this + 0x16c))(this);
  if (cVar3 == '\0') {
    uVar1 = *(uint *)(this + 0x18c);
    while( true ) {
      if ((((uVar1 == 0xffffffff) ||
           (puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 == (undefined *)0xfffffffc)) ||
          (*(uint *)(puVar4 + 8) != uVar1 >> 0xc)) ||
         (pCVar2 = *(CBaseEntity **)(puVar4 + 4), pCVar2 == (CBaseEntity *)0x0)) {
        *(uint *)(this + 0x14c) = *(uint *)(this + 0x14c) & 0xfffeffff;
        return;
      }
      cVar3 = AnyPlayersInHierarchy_R(pCVar2);
      if (cVar3 != '\0') break;
      uVar1 = *(uint *)(pCVar2 + 400);
    }
  }
  *(uint *)(this + 0x14c) = *(uint *)(this + 0x14c) | 0x10000;
  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)