Host_Shutdown
0x00179c90 · 701 bytes · unknown
_Z13Host_Shutdownv
Decompiled
undefined (0 params)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* Host_Shutdown() */
void Host_Shutdown(void)
{
int *piVar1;
if (Host_Shutdown()::shutting_down == '\0') {
Host_Shutdown()::shutting_down = 1;
(**(code **)(*(int *)phonehome + 8))(phonehome,2,0);
(**(code **)(*(int *)phonehome + 4))(phonehome);
Host_Disconnect(true);
CM_FreeMap();
host_initialized = 0;
VProfRecord_Shutdown();
if (g_pMatchFramework != (int *)0x0) {
(**(code **)(*g_pMatchFramework + 0x10))(g_pMatchFramework);
}
TraceShutdown("Decal_Shutdown()",0);
Decal_Shutdown();
TraceShutdown("modelloader->Shutdown()",0);
(**(code **)(*(int *)modelloader + 4))(modelloader);
TraceShutdown("ShutdownStudioRender()",0);
ShutdownStudioRender();
TraceShutdown("StaticPropMgr()->Shutdown()",0);
piVar1 = (int *)StaticPropMgr();
(**(code **)(*piVar1 + 4))(piVar1);
TraceShutdown("ShutdownMaterialSystem()",0);
ShutdownMaterialSystem();
TraceShutdown("HLTV_Shutdown()",0);
HLTV_Shutdown();
TraceShutdown("g_Log.Shutdown()",0);
CLog::Shutdown((CLog *)g_Log);
TraceShutdown("g_pMaster->Shutdown()",0);
(**(code **)(*(int *)g_pMaster + 4))(g_pMaster);
TraceShutdown("sv.Shutdown()",0);
CGameServer::Shutdown((CGameServer *)&sv);
TraceShutdown("g_GameEventManager.Shutdown()",0);
CGameEventManager::Shutdown((CGameEventManager *)&s_GameEventManager);
TraceShutdown("NET_Shutdown()",0);
NET_Shutdown();
TraceShutdown("g_pSteamSocketMgr->Shutdown()",0);
(**(code **)(*(int *)g_pSteamSocketMgr + 4))(g_pSteamSocketMgr);
TraceShutdown("Filter_Shutdown()",0);
Filter_Shutdown();
TraceShutdown("COM_Shutdown()",0);
COM_Shutdown();
TraceShutdown("g_pCVar->Shutdown()",0);
(**(code **)(*g_pCVar + 0x10))(g_pCVar);
TraceShutdown("Cmd_Shutdown()",0);
Cmd_Shutdown();
TraceShutdown("Cbuf_Shutdown()",0);
Cbuf_Shutdown();
TraceShutdown("Con_Shutdown()",0);
Con_Shutdown();
TraceShutdown("Memory_Shutdown()",0);
Memory_Shutdown();
if (_g_pThreadPool != (int *)0x0) {
(**(code **)(*_g_pThreadPool + 0x14))(_g_pThreadPool,0xffffffff);
}
DTI_Term();
ServerDTI_Term();
return;
}
Msg("Recursive shutdown!!!\n");
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.