CDirectorItemManager::RemoveAllItems
0x008a45c0 · 337 bytes · __cdecl
_ZN20CDirectorItemManager14RemoveAllItemsEv
Decompiled
undefined (0 params)
/* CDirectorItemManager::RemoveAllItems() */
void CDirectorItemManager::RemoveAllItems(void)
{
code *pcVar1;
int *piVar2;
int *piVar3;
CBaseEntity *pCVar4;
CBaseEntity *pCVar5;
int *piVar6;
char *pcVar7;
int iVar8;
int iVar9;
int *piVar10;
char *pcVar11;
undefined1 *puStack00000004;
int aiStackY_34 [2];
char *local_20 [4];
pcVar11 = "weapon_pain_pills_spawn";
piVar10 = (int *)&stack0xffffffd4;
do {
pCVar4 = (CBaseEntity *)
CGlobalEntityList::FindEntityByClassname
((CGlobalEntityList *)gEntList,(CBaseEntity *)0x0,pcVar11);
while (pCVar4 != (CBaseEntity *)0x0) {
pCVar5 = (CBaseEntity *)
CGlobalEntityList::FindEntityByClassname
((CGlobalEntityList *)gEntList,pCVar4,pcVar11);
UTIL_Remove(pCVar4);
pCVar4 = pCVar5;
}
pcVar11 = pcVar11 + 0x80;
} while (pcVar11 != "20CDirectorItemManager");
pcVar11 = "models/props_junk/gascan001a.mdl";
do {
piVar10[2] = (int)"prop_physics";
piVar10[1] = 0;
*piVar10 = (int)gEntList;
piVar10[-1] = 0x8a4640;
piVar6 = (int *)CGlobalEntityList::FindEntityByClassname
((CGlobalEntityList *)*piVar10,(CBaseEntity *)piVar10[1],
(char *)piVar10[2]);
piVar3 = piVar10;
joined_r0x008a4644:
piVar10 = piVar3;
piVar2 = piVar6;
if (piVar2 != (int *)0x0) {
piVar10[2] = (int)"prop_physics";
piVar10[1] = (int)piVar2;
*piVar10 = (int)gEntList;
piVar10[-1] = 0x8a466a;
piVar6 = (int *)CGlobalEntityList::FindEntityByClassname
((CGlobalEntityList *)*piVar10,(CBaseEntity *)piVar10[1],
(char *)piVar10[2]);
iVar8 = *piVar2;
piVar10[1] = (int)piVar2;
*piVar10 = (int)local_20;
pcVar1 = *(code **)(iVar8 + 0x20);
piVar10[-1] = 0x8a467b;
(*pcVar1)();
pcVar7 = local_20[0];
if (local_20[0] == (char *)0x0) {
pcVar7 = "";
}
piVar3 = piVar10 + -1;
if (pcVar11 != pcVar7) break;
goto LAB_008a469f;
}
pcVar11 = pcVar11 + 0x80;
if (pcVar11 == "weapon_pain_pills_spawn") {
piVar10[2] = (int)"weapon_melee_spawn";
piVar10[1] = 0;
*piVar10 = (int)gEntList;
piVar10[-1] = 0x8a46d6;
iVar8 = CGlobalEntityList::FindEntityByClassname
((CGlobalEntityList *)*piVar10,(CBaseEntity *)piVar10[1],(char *)piVar10[2])
;
while (iVar8 != 0) {
piVar10[2] = (int)"weapon_melee_spawn";
piVar10[1] = iVar8;
*piVar10 = (int)gEntList;
piVar10[-1] = 0x8a46fa;
iVar9 = CGlobalEntityList::FindEntityByClassname
((CGlobalEntityList *)*piVar10,(CBaseEntity *)piVar10[1],
(char *)piVar10[2]);
*piVar10 = iVar8;
piVar10[-1] = 0x8a4704;
UTIL_Remove((CBaseEntity *)*piVar10);
iVar8 = iVar9;
}
puStack00000004 = gEntList;
CGlobalEntityList::CleanupDeleteList();
return;
}
} while( true );
*piVar10 = (int)pcVar7;
piVar10[-1] = (int)pcVar11;
piVar10[-2] = 0x8a469b;
iVar8 = _V_stricmp((char *)piVar10[-1],(char *)*piVar10);
if (iVar8 == 0) {
LAB_008a469f:
piVar10[-1] = (int)piVar2;
piVar10[-2] = 0x8a46a7;
UTIL_Remove((CBaseEntity *)piVar10[-1]);
}
goto joined_r0x008a4644;
}
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.