mirror of
https://github.com/alliedmodders/metamod-source.git
synced 2025-02-20 13:54:14 +01:00
LevelShutdown() is no longer unnecessarily hooked through SourceHook
--HG-- extra : convert_revision : svn%3Ac2935e3e-5518-0410-8daf-afa5dab7d4e3/trunk%4074
This commit is contained in:
parent
a6ec71cf8e
commit
b178acc5cd
@ -48,8 +48,7 @@ public:
|
||||
{ m_pOrig->GameFrame(simulating); }
|
||||
virtual void PreClientUpdate( bool simulating )
|
||||
{ m_pOrig->PreClientUpdate(simulating); }
|
||||
virtual void LevelShutdown( void )
|
||||
{ m_pOrig->LevelShutdown(); }
|
||||
virtual void LevelShutdown( void );
|
||||
virtual void GameShutdown( void )
|
||||
{ m_pOrig->GameShutdown(); }
|
||||
virtual void DLLShutdown( void );
|
||||
|
@ -26,8 +26,6 @@
|
||||
* @file sourcemm.cpp
|
||||
*/
|
||||
|
||||
SH_DECL_HOOK0_void(IServerGameDLL, LevelShutdown, SH_NOATTRIB, 0);
|
||||
|
||||
CServerGameDLL g_TempGameDLL;
|
||||
CServerGameEnts g_TempGameEnts;
|
||||
CServerGameClients g_TempGameClients;
|
||||
@ -241,7 +239,6 @@ bool CServerGameDLL::DLLInit(CreateInterfaceFn engineFactory, CreateInterfaceFn
|
||||
//This is so plugins can hook everything on load, BUT, new plugins will be reloaded
|
||||
// if the server is shut down (silly, but rare case).
|
||||
bInFirstLevel = true;
|
||||
SH_ADD_HOOK_STATICFUNC(IServerGameDLL, LevelShutdown, serverDll, LevelShutdown_handler, false);
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -416,6 +413,12 @@ void LogMessage(const char *msg, ...)
|
||||
g_Engine.engine->LogPrint(buffer);
|
||||
}
|
||||
|
||||
void CServerGameDLL::LevelShutdown(void)
|
||||
{
|
||||
LevelShutdown_handler();
|
||||
m_pOrig->LevelShutdown();
|
||||
}
|
||||
|
||||
void LevelShutdown_handler(void)
|
||||
{
|
||||
if (!bInFirstLevel)
|
||||
@ -430,6 +433,4 @@ void LevelShutdown_handler(void)
|
||||
} else {
|
||||
bInFirstLevel = false;
|
||||
}
|
||||
|
||||
RETURN_META(MRES_IGNORED);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user