L L4D2node

CBaseEntityList::AddNonNetworkableEntity

0x0044a560 · 172 bytes · __cdecl

_ZN15CBaseEntityList23AddNonNetworkableEntityEP13IHandleEntity

Decompiled

undefined (1 param)

/* CBaseEntityList::AddNonNetworkableEntity(IHandleEntity*) */

IHandleEntity * CBaseEntityList::AddNonNetworkableEntity(IHandleEntity *param_1)

{
  int iVar1;
  int iVar2;
  int in_stack_00000008;
  int in_stack_0000000c;
  
  iVar1 = *(int *)(Elf32_Ehdr_00010000.e_ident_pad + in_stack_00000008 + 3);
  if (iVar1 == 0) {
    Warning("CBaseEntityList::AddNonNetworkableEntity: no free slots!\n");
    *(undefined4 *)param_1 = 0xffffffff;
    return param_1;
  }
  iVar2 = *(int *)(iVar1 + 8);
  if (iVar1 == iVar2) goto LAB_0044a5a0;
  if (iVar2 == 0) {
    *(undefined4 *)(Elf32_Ehdr_00010000.e_ident_pad + in_stack_00000008 + 3) =
         *(undefined4 *)(iVar1 + 0xc);
    iVar2 = *(int *)(iVar1 + 0xc);
    if (iVar2 == 0) goto LAB_0044a5f0;
LAB_0044a594:
    *(undefined4 *)(iVar2 + 8) = *(undefined4 *)(iVar1 + 8);
  }
  else {
    *(undefined4 *)(iVar2 + 0xc) = *(undefined4 *)(iVar1 + 0xc);
    iVar2 = *(int *)(iVar1 + 0xc);
    if (iVar2 != 0) goto LAB_0044a594;
LAB_0044a5f0:
    *(undefined4 *)(Elf32_Ehdr_00010000.e_ident_pad + in_stack_00000008 + 7) =
         *(undefined4 *)(iVar1 + 8);
  }
  *(int *)(iVar1 + 0xc) = iVar1;
  *(int *)(iVar1 + 8) = iVar1;
LAB_0044a5a0:
  AddEntityAtSlot(param_1,in_stack_00000008,in_stack_0000000c);
  return param_1;
}

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)