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 intoaddons/sourcemod/gamedata/<your_plugin>.txt
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.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.