L L4D2node

CBaseEntityList::AddEntityAtSlot

0x0044a490 · 135 bytes · __cdecl

_ZN15CBaseEntityList15AddEntityAtSlotEP13IHandleEntityii

Decompiled

undefined (3 params)

/* CBaseEntityList::AddEntityAtSlot(IHandleEntity*, int, int) */

IHandleEntity * CBaseEntityList::AddEntityAtSlot(IHandleEntity *param_1,int param_2,int param_3)

{
  int iVar1;
  uint in_stack_00000010;
  int in_stack_00000014;
  undefined4 local_20 [4];
  
  iVar1 = in_stack_00000010 * 0x10 + param_2;
  *(int *)(iVar1 + 4) = param_3;
  if (in_stack_00000014 != -1) {
    *(int *)(iVar1 + 8) = in_stack_00000014;
  }
  CEntInfoList::LinkBefore
            ((CEntInfoList *)(Elf32_Ehdr_00010000.e_ident_magic_str + param_2 + 3),(CEntInfo *)0x0,
             (CEntInfo *)(iVar1 + 4));
  *(uint *)param_1 = *(int *)(iVar1 + 8) << 0xc | in_stack_00000010;
  (**(code **)(*(int *)param_3 + 8))(param_3,param_1);
  local_20[0] = *(undefined4 *)param_1;
  (*(code *)**(undefined4 **)param_2)(param_2,param_3,local_20);
  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)