L L4D2node

CGlobalEntityList::OnAddEntity

0x0067b240 · 138 bytes · __thiscall

_ZN17CGlobalEntityList11OnAddEntityEP13IHandleEntity11CBaseHandle

Decompiled

undefined (3 params)

/* CGlobalEntityList::OnAddEntity(IHandleEntity*, CBaseHandle) */

void __thiscall CGlobalEntityList::OnAddEntity(CGlobalEntityList *this,int *param_1,uint *param_3)

{
  undefined4 *puVar1;
  uint uVar2;
  int iVar3;
  int iVar4;
  int iVar5;
  
  uVar2 = *param_3;
  *(int *)(this + 0x10018) = *(int *)(this + 0x10018) + 1;
  if (*(int *)(this + 0x10014) < (int)(uVar2 & 0xfff)) {
    *(uint *)(this + 0x10014) = uVar2 & 0xfff;
  }
  iVar3 = (**(code **)(*param_1 + 0x18))(param_1);
  if (*(int *)(iVar3 + 0x30) != 0) {
    *(int *)(this + 0x1001c) = *(int *)(this + 0x1001c) + 1;
  }
  iVar4 = *(int *)(this + 0x10030) + -1;
  iVar5 = iVar4 * 4;
  if (-1 < iVar4) {
    do {
      iVar4 = iVar4 + -1;
      puVar1 = (undefined4 *)(*(int *)(this + 0x10024) + iVar5);
      iVar5 = iVar5 + -4;
      (*(code *)**(undefined4 **)*puVar1)((undefined4 *)*puVar1,iVar3);
    } while (iVar4 != -1);
  }
  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)