Remove WasRestartRequested Hook when pGameServer is destroyed.

This commit is contained in:
KyleSanderson
2014-01-29 02:34:13 -07:00
parent 9b9e3d98f2
commit aef58bb214
3 changed files with 32 additions and 15 deletions
+9 -5
View File
@@ -21,13 +21,17 @@
DETOUR_DECL_STATIC0(SteamAPIShutdown, void)
{
DETOUR_STATIC_CALL(SteamAPIShutdown)(); /* We're not a monster. */
if (g_SteamWorks.pSWGameServer == NULL)
if (g_SteamWorks.pSWGameServer != NULL)
{
return;
if (g_SteamWorks.pGSHooks != NULL)
{
g_SteamWorks.pGSHooks->RemoveHooks(g_SteamWorks.pSWGameServer->GetGameServer(), false);
}
g_SteamWorks.pSWGameServer->Reset();
}
g_SteamWorks.pSWGameServer->Reset();
DETOUR_STATIC_CALL(SteamAPIShutdown)(); /* We're not a monster. */
}
SteamWorksGSDetours::SteamWorksGSDetours()