L L4D2node

CDirectorItemManager::AddSpawnedItemsToList

0x008a4db0 · 129 bytes · __thiscall

_ZN20CDirectorItemManager21AddSpawnedItemsToListEP20EntityPopulationInfoI7CHandleI11CBaseEntityEER10CUtlVectorI18EntityLocationInfoIS3_E10CUtlMemoryIS8_iEE

Decompiled

undefined (3 params)

/* CDirectorItemManager::AddSpawnedItemsToList(EntityPopulationInfo<CHandle<CBaseEntity> >*,
   CUtlVector<EntityLocationInfo<CHandle<CBaseEntity> >,
   CUtlMemory<EntityLocationInfo<CHandle<CBaseEntity> >, int> >&) */

void __thiscall
CDirectorItemManager::AddSpawnedItemsToList
          (CDirectorItemManager *this,EntityPopulationInfo *param_1,CUtlVector *param_2)

{
  uint uVar1;
  EntityLocationInfo *pEVar2;
  undefined *puVar3;
  int iVar4;
  
  iVar4 = 0;
  if (0 < *(int *)(param_1 + 0x28)) {
    do {
      while( true ) {
        pEVar2 = (EntityLocationInfo *)(iVar4 * 0x20 + *(int *)(param_1 + 0x1c));
        uVar1 = *(uint *)(pEVar2 + 0x1c);
        if ((((uVar1 == 0xffffffff) ||
             (puVar3 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar3 == (undefined *)0xfffffffc))
            || (*(uint *)(puVar3 + 8) != uVar1 >> 0xc)) || (*(int *)(puVar3 + 4) == 0)) break;
        iVar4 = iVar4 + 1;
        CUtlVector<EntityLocationInfo<CHandle<CBaseEntity>>,CUtlMemory<EntityLocationInfo<CHandle<CBaseEntity>>,int>>
        ::InsertBefore((CUtlVector<EntityLocationInfo<CHandle<CBaseEntity>>,CUtlMemory<EntityLocationInfo<CHandle<CBaseEntity>>,int>>
                        *)param_2,*(int *)(param_2 + 0xc),pEVar2);
        if (*(int *)(param_1 + 0x28) <= iVar4) {
          return;
        }
      }
      iVar4 = iVar4 + 1;
    } while (iVar4 < *(int *)(param_1 + 0x28));
  }
  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)