CMapEntitySpawner::HandleTemplates
0x006f0bc0 · 203 bytes · __thiscall
_ZN17CMapEntitySpawner15HandleTemplatesEv
Decompiled
undefined (1 param)
/* CMapEntitySpawner::HandleTemplates() */
void __thiscall CMapEntitySpawner::HandleTemplates(CMapEntitySpawner *this)
{
int iVar1;
undefined4 uVar2;
int iVar3;
int iVar4;
int iVar5;
int *piVar6;
int in_GS_OFFSET;
undefined4 uStack_40;
int aiStack_3c [7];
undefined4 auStack_20 [4];
int local_10;
local_10 = *(int *)(in_GS_OFFSET + 0x14);
piVar6 = aiStack_3c;
if (*(int *)(this + 0x18) != 0) {
iVar3 = -((*(int *)(this + 0x20) * 4 + 0xfU & 0xfffffff0) + 0x10);
iVar4 = 0;
iVar1 = (int)auStack_20 + iVar3;
if (*(int *)(this + 0x20) != 0) {
do {
*(undefined4 *)(iVar1 + iVar4 * 4) = *(undefined4 *)(iVar4 * 0x10 + *(int *)(this + 8));
iVar4 = iVar4 + 1;
} while (*(int *)(this + 0x20) != iVar4);
}
*(undefined4 *)((int)&uStack_40 + iVar3) = 0x6f0c3a;
Templates_RemoveAll();
*(undefined4 *)((int)aiStack_3c + iVar3 + 0x10) = *(undefined4 *)(this + 0x20);
uVar2 = *(undefined4 *)(this + 4);
*(int *)((int)aiStack_3c + iVar3 + 8) = iVar1;
*(undefined4 *)((int)aiStack_3c + iVar3 + 0xc) = uVar2;
*(undefined4 *)((int)aiStack_3c + iVar3 + 4) = *(undefined4 *)(this + 0x18);
*(undefined4 *)((int)aiStack_3c + iVar3) = *(undefined4 *)(this + 0xc);
*(undefined4 *)((int)&uStack_40 + iVar3) = 0x6f0c5e;
MapEntity_ParseAllEntites_SpawnTemplates
(*(CPointTemplate ***)((int)aiStack_3c + iVar3),*(int *)((int)aiStack_3c + iVar3 + 4),
*(CBaseEntity ***)((int)aiStack_3c + iVar3 + 8),
*(HierarchicalSpawnMapData_t **)((int)aiStack_3c + iVar3 + 0xc),
*(int *)((int)aiStack_3c + iVar3 + 0x10));
iVar4 = 0;
piVar6 = (int *)((int)aiStack_3c + iVar3);
if (*(int *)(this + 0x20) != 0) {
do {
iVar5 = iVar4 + 1;
*(undefined4 *)(iVar4 * 0x10 + *(int *)(this + 8)) = *(undefined4 *)(iVar1 + iVar4 * 4);
iVar4 = iVar5;
piVar6 = (int *)((int)aiStack_3c + iVar3);
} while (*(int *)(this + 0x20) != iVar5);
}
}
if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {
/* WARNING: Subroutine does not return */
*(undefined **)((int)piVar6 + -4) = &UNK_006f0c8f;
__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.