CServerGameDLL::DLLShutdown
0x006c4660 · 513 bytes · __cdecl
_ZN14CServerGameDLL11DLLShutdownEv
Decompiled
undefined (0 params)
/* CServerGameDLL::DLLShutdown() */
void CServerGameDLL::DLLShutdown(void)
{
code *pcVar1;
CAwardPool *pCVar2;
undefined4 uVar3;
char *pcVar4;
int iVar5;
undefined4 *puVar6;
byte bVar7;
bVar7 = 0;
ModelSoundsCacheShutdown();
pcVar1 = *(code **)(*(int *)g_pGameSaveRestoreBlockSet + 0x28);
uVar3 = GetVScriptSaveRestoreBlockHandler();
(*pcVar1)(g_pGameSaveRestoreBlockSet,uVar3);
pcVar1 = *(code **)(*(int *)g_pGameSaveRestoreBlockSet + 0x28);
uVar3 = GetAchievementSaveRestoreBlockHandler();
(*pcVar1)(g_pGameSaveRestoreBlockSet,uVar3);
pcVar1 = *(code **)(*(int *)g_pGameSaveRestoreBlockSet + 0x28);
uVar3 = GetCommentarySaveRestoreBlockHandler();
(*pcVar1)(g_pGameSaveRestoreBlockSet,uVar3);
pcVar1 = *(code **)(*(int *)g_pGameSaveRestoreBlockSet + 0x28);
uVar3 = GetEventQueueSaveRestoreBlockHandler();
(*pcVar1)(g_pGameSaveRestoreBlockSet,uVar3);
pcVar1 = *(code **)(*(int *)g_pGameSaveRestoreBlockSet + 0x28);
uVar3 = GetDefaultResponseSystemSaveRestoreBlockHandler();
(*pcVar1)(g_pGameSaveRestoreBlockSet,uVar3);
pcVar1 = *(code **)(*(int *)g_pGameSaveRestoreBlockSet + 0x28);
uVar3 = GetTemplateSaveRestoreBlockHandler();
(*pcVar1)(g_pGameSaveRestoreBlockSet,uVar3);
pcVar1 = *(code **)(*(int *)g_pGameSaveRestoreBlockSet + 0x28);
uVar3 = GetPhysSaveRestoreBlockHandler();
(*pcVar1)(g_pGameSaveRestoreBlockSet,uVar3);
pcVar1 = *(code **)(*(int *)g_pGameSaveRestoreBlockSet + 0x28);
uVar3 = GetEntitySaveRestoreBlockHandler();
(*pcVar1)(g_pGameSaveRestoreBlockSet,uVar3);
pcVar4 = (char *)CTextStatsMgr::GetStatsFilename((CTextStatsMgr *)g_TextStatsMgr);
if ((pcVar4 == (char *)0x0) || (*pcVar4 == '\0')) {
CTextStatsMgr::SetStatsFilename((CTextStatsMgr *)g_TextStatsMgr,"stats.txt");
}
CTextStatsMgr::WriteFile((CTextStatsMgr *)g_TextStatsMgr,filesystem,(char *)0x0);
IGameSystem::ShutdownAllSystems();
RemoveBotControl();
if (TheDirector != (int *)0x0) {
(**(code **)(*TheDirector + 4))(TheDirector);
TheDirector = (int *)0x0;
}
pCVar2 = TheAwardPool;
if (TheAwardPool != (CAwardPool *)0x0) {
CAwardPool::~CAwardPool(TheAwardPool);
operator_delete(pCVar2);
TheAwardPool = (CAwardPool *)0x0;
}
if (ThePlayerReporter != (int *)0x0) {
(**(code **)(*ThePlayerReporter + 4))(ThePlayerReporter);
ThePlayerReporter = (int *)0x0;
}
if (TheNavMesh != (int *)0x0) {
(**(code **)(*TheNavMesh + 4))(TheNavMesh);
TheNavMesh = (int *)0x0;
}
ServerDemoSystem_Shutdown();
puVar6 = &s_SteamAPIContext;
for (iVar5 = 0x17; iVar5 != 0; iVar5 = iVar5 + -1) {
*puVar6 = 0;
puVar6 = puVar6 + (uint)bVar7 * -2 + 1;
}
puVar6 = &s_SteamGameServerAPIContext;
for (iVar5 = 8; iVar5 != 0; iVar5 = iVar5 + -1) {
*puVar6 = 0;
puVar6 = puVar6 + (uint)bVar7 * -2 + 1;
}
DisconnectTier3Libraries();
DisconnectTier2Libraries();
ConVar_Unregister();
DisconnectTier1Libraries();
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.