CGameServer::Clear
0x00200580 · 374 bytes · __thiscall
_ZN11CGameServer5ClearEv
Decompiled
undefined (1 param)
/* CGameServer::Clear() */
void __thiscall CGameServer::Clear(CGameServer *this)
{
void *pvVar1;
int *piVar2;
int iVar3;
*(undefined4 *)(this + 0x2d364) = 0;
*(undefined4 *)(this + 0x2d36c) = 0;
*(undefined4 *)(this + 0x2d368) = 0;
*(undefined4 *)(this + 0x2d370) = 0;
this[0x226] = (CGameServer)0x0;
this[0x1c8] = (CGameServer)0x0;
CCommonHostState::SetWorldModel((CCommonHostState *)&host_state,(model_t *)0x0);
_V_memset(this + 0x1c9,0,0x40);
piVar2 = serverGameDLL;
*(undefined4 *)(this + 0x20c) = 0;
*(undefined4 *)(this + 0x210) = 0;
*(undefined4 *)(this + 0x214) = 0;
g_ServerGlobalVariables._80_4_ = 0;
g_ServerGlobalVariables._88_4_ = 0;
if (piVar2 != (int *)0x0) {
for (iVar3 = (**(code **)(*piVar2 + 0x28))(piVar2); iVar3 != 0; iVar3 = *(int *)(iVar3 + 8)) {
*(undefined4 *)(iVar3 + 0x10) = 0xffff;
}
}
if (0 < *(int *)(this + 0x234)) {
iVar3 = 0;
do {
pvVar1 = *(void **)(*(int *)(this + 0x228) + iVar3 * 4);
if (pvVar1 != (void *)0x0) {
if (*(void **)((int)pvVar1 + 0x14) != (void *)0x0) {
operator_delete(*(void **)((int)pvVar1 + 0x14));
}
*(undefined ***)((int)pvVar1 + 0x1c) = &PTR__CEngineRecipientFilter_002ae5c8;
*(undefined4 *)((int)pvVar1 + 0x30) = 0;
CUtlMemory<int,int>::Purge((CUtlMemory<int,int> *)((int)pvVar1 + 0x24));
*(undefined4 *)((int)pvVar1 + 0x34) = *(undefined4 *)((int)pvVar1 + 0x24);
CUtlMemory<int,int>::Purge((CUtlMemory<int,int> *)((int)pvVar1 + 0x24));
*(undefined ***)((int)pvVar1 + 0x1c) = &PTR__IRecipientFilter_002aa388;
operator_delete(pvVar1);
}
iVar3 = iVar3 + 1;
} while (iVar3 < *(int *)(this + 0x234));
}
*(undefined4 *)(this + 0x234) = 0;
CUtlMemory<CEventInfo*,int>::Purge((CUtlMemory<CEventInfo*,int> *)(this + 0x228));
*(undefined4 *)(this + 0x238) = *(undefined4 *)(this + 0x228);
CBaseServer::Clear((CBaseServer *)this);
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.