CTeamplayRoundBasedRules::CleanUpMap
0x004c8c70 · 456 bytes · __thiscall
_ZN24CTeamplayRoundBasedRules10CleanUpMapEv
Decompiled
undefined (1 param)
/* CTeamplayRoundBasedRules::CleanUpMap() */
void __thiscall CTeamplayRoundBasedRules::CleanUpMap(CTeamplayRoundBasedRules *this)
{
char cVar1;
CBaseEntity *pCVar2;
undefined1 *puVar3;
char *pcVar4;
int iVar5;
undefined4 uVar6;
undefined4 uVar7;
undefined **local_28;
uint local_24;
undefined4 local_20;
if (*(int *)(mp_showcleanedupents._28_4_ + 0x30) != 0) {
Msg("CleanUpMap\n===============\n");
uVar6 = CGlobalEntityList::NumberOfEdicts((CGlobalEntityList *)gEntList);
uVar7 = CGlobalEntityList::NumberOfEntities((CGlobalEntityList *)gEntList);
Msg(" Entities: %d (%d edicts)\n",uVar7,uVar6);
}
for (pCVar2 = (CBaseEntity *)
CGlobalEntityList::NextEnt((CGlobalEntityList *)gEntList,(CBaseEntity *)0x0);
pCVar2 != (CBaseEntity *)0x0;
pCVar2 = (CBaseEntity *)CGlobalEntityList::NextEnt((CGlobalEntityList *)gEntList,pCVar2)) {
cVar1 = (**(code **)(*(int *)this + 0x2a0))(this,pCVar2);
if (cVar1 == '\0') {
if ((*(byte *)(mp_showcleanedupents._28_4_ + 0x30) & 1) != 0) {
puVar3 = *(undefined1 **)(pCVar2 + 0x7c);
if (puVar3 == (undefined1 *)0x0) {
puVar3 = &DAT_00d539c2;
}
Msg("Removed Entity: %s\n",puVar3);
}
UTIL_Remove(pCVar2);
}
}
CEventQueue::Clear((CEventQueue *)g_EventQueue);
CGlobalEntityList::CleanupDeleteList();
(**(code **)(*engine + 0x17c))(engine);
if ((*(byte *)(mp_showcleanedupents._28_4_ + 0x30) & 2) != 0) {
Msg(" Entities Left:\n");
for (pCVar2 = (CBaseEntity *)
CGlobalEntityList::NextEnt((CGlobalEntityList *)gEntList,(CBaseEntity *)0x0);
pCVar2 != (CBaseEntity *)0x0;
pCVar2 = (CBaseEntity *)CGlobalEntityList::NextEnt((CGlobalEntityList *)gEntList,pCVar2)) {
if (*(int *)(pCVar2 + 0x30) == 0) {
iVar5 = 0;
}
else {
iVar5 = *(int *)(pCVar2 + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
}
puVar3 = *(undefined1 **)(pCVar2 + 0x7c);
if (puVar3 == (undefined1 *)0x0) {
puVar3 = &DAT_00d539c2;
}
Msg(" %s (%d)\n",puVar3,iVar5);
}
}
local_28 = &PTR_ShouldCreateEntity_00c20b60;
local_20 = g_pGameRules;
local_24 = (uint)DAT_00fe3114;
pcVar4 = (char *)(**(code **)(*engine + 0x11c))(engine);
MapEntity_ParseAllEntities(pcVar4,(IMapEntityFilter *)&local_28,true);
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.