SetupParentsForSpawnList
0x006f00d0 · 419 bytes · __cdecl
_Z24SetupParentsForSpawnListiP19HierarchicalSpawn_t
Decompiled
undefined (2 params)
/* SetupParentsForSpawnList(int, HierarchicalSpawn_t*) */
void SetupParentsForSpawnList(int param_1,HierarchicalSpawn_t *param_2)
{
int *piVar1;
char *pcVar2;
int iVar3;
int iVar4;
char *pcVar5;
HierarchicalSpawn_t *pHVar6;
int iVar7;
int in_GS_OFFSET;
char *local_130 [4];
char local_120 [256];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
iVar7 = param_1 + -1;
pHVar6 = param_2 + iVar7 * 0x10;
if (-1 < iVar7) {
do {
while (piVar1 = *(int **)pHVar6, piVar1 == (int *)0x0) {
LAB_006f01c9:
iVar7 = iVar7 + -1;
pHVar6 = pHVar6 + -0x10;
if (iVar7 == -1) goto LAB_006f0260;
}
pcVar5 = (char *)piVar1[0x21];
if (pcVar5 == (char *)0x0) {
pcVar5 = "";
}
else {
pcVar2 = strchr(pcVar5,0x2c);
if (pcVar2 != (char *)0x0) {
iVar4 = nexttoken(local_120,0x100,pcVar5,',');
AllocPooledString((char *)local_130);
piVar1[0x21] = (int)local_130[0];
pcVar5 = "";
if (local_130[0] != (char *)0x0) {
pcVar5 = local_130[0];
}
iVar3 = CGlobalEntityList::FindEntityByName
((CGlobalEntityList *)gEntList,(CBaseEntity *)0x0,pcVar5,
(CBaseEntity *)0x0,(CBaseEntity *)0x0,(CBaseEntity *)0x0,
(IEntityFindFilter *)0x0);
*(int *)(pHVar6 + 8) = iVar3;
*(int *)(pHVar6 + 0xc) = iVar4;
goto LAB_006f01c9;
}
}
iVar4 = CGlobalEntityList::FindEntityByName
((CGlobalEntityList *)gEntList,(CBaseEntity *)0x0,pcVar5,(CBaseEntity *)0x0,
(CBaseEntity *)0x0,(CBaseEntity *)0x0,(IEntityFindFilter *)0x0);
if ((iVar4 == 0) || (*(int *)(iVar4 + 0x30) == 0)) goto LAB_006f01c9;
iVar7 = iVar7 + -1;
pHVar6 = pHVar6 + -0x10;
(**(code **)(*piVar1 + 0x98))(piVar1,iVar4,0xffffffff);
} while (iVar7 != -1);
}
LAB_006f0260:
if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return;
}
SourceMod gamedata
paste intoaddons/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.
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.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.