mirror of
https://github.com/alliedmodders/metamod-source.git
synced 2025-02-26 19:54:14 +01:00
fixed a few implementation details
--HG-- branch : sourcemm-1.4.3 extra : convert_revision : svn%3Ac2935e3e-5518-0410-8daf-afa5dab7d4e3/branches/sourcemm-1.4.3%40587
This commit is contained in:
parent
41d6c2c37e
commit
b8a88dbdb2
@ -575,16 +575,19 @@ void ClearGamedllList()
|
|||||||
gamedll_list.clear();
|
gamedll_list.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void UnloadMetamod()
|
void UnloadMetamod(bool shutting_down)
|
||||||
{
|
{
|
||||||
/* Unload plugins */
|
/* Unload plugins */
|
||||||
g_PluginMngr.UnloadAll();
|
g_PluginMngr.UnloadAll();
|
||||||
|
|
||||||
/* Add the FCVAR_GAMEDLL flag to our cvars so the engine removes them properly */
|
if (shutting_down)
|
||||||
g_SMConVarAccessor.MarkCommandsAsGameDLL();
|
{
|
||||||
g_SMConVarAccessor.UnregisterGameDLLCommands();
|
/* Add the FCVAR_GAMEDLL flag to our cvars so the engine removes them properly */
|
||||||
|
g_SMConVarAccessor.MarkCommandsAsGameDLL();
|
||||||
|
g_SMConVarAccessor.UnregisterGameDLLCommands();
|
||||||
|
|
||||||
SH_CALL(g_GameDllPatch, &IServerGameDLL::DLLShutdown)();
|
SH_CALL(g_GameDllPatch, &IServerGameDLL::DLLShutdown)();
|
||||||
|
}
|
||||||
|
|
||||||
SH_RELEASE_CALLCLASS(g_GameDllPatch);
|
SH_RELEASE_CALLCLASS(g_GameDllPatch);
|
||||||
g_GameDllPatch = NULL;
|
g_GameDllPatch = NULL;
|
||||||
@ -600,7 +603,7 @@ void UnloadMetamod()
|
|||||||
|
|
||||||
void DLLShutdown_handler()
|
void DLLShutdown_handler()
|
||||||
{
|
{
|
||||||
UnloadMetamod();
|
UnloadMetamod(true);
|
||||||
RETURN_META(MRES_SUPERCEDE);
|
RETURN_META(MRES_SUPERCEDE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -118,7 +118,7 @@ extern int g_GameDllVersion;
|
|||||||
|
|
||||||
extern bool bGameInit;
|
extern bool bGameInit;
|
||||||
|
|
||||||
void UnloadMetamod();
|
void UnloadMetamod(bool shutting_down);
|
||||||
|
|
||||||
/** @brief Global CallClass for IServerGameDLL */
|
/** @brief Global CallClass for IServerGameDLL */
|
||||||
extern SourceHook::CallClass<IServerGameDLL> *g_GameDllPatch;
|
extern SourceHook::CallClass<IServerGameDLL> *g_GameDllPatch;
|
||||||
|
@ -93,7 +93,13 @@ void VSPListener::ServerActivate(edict_t *pEdictList, int edictCount, int client
|
|||||||
|
|
||||||
void VSPListener::Unload()
|
void VSPListener::Unload()
|
||||||
{
|
{
|
||||||
UnloadMetamod();
|
if (IsRootLoadMethod())
|
||||||
|
{
|
||||||
|
UnloadMetamod(false);
|
||||||
|
}
|
||||||
|
m_Loadable = true;
|
||||||
|
m_Loaded = false;
|
||||||
|
m_bIsRootLoadMethod = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void VSPListener::SetLoadable(bool set)
|
void VSPListener::SetLoadable(bool set)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user