added a layer for autoloading per-game extensions
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401386
This commit is contained in:
@@ -720,6 +720,12 @@ bool CExtensionManager::UnloadExtension(IExtension *_pExt)
|
||||
}
|
||||
}
|
||||
|
||||
/* :HACKHACK: make sure g_pGameExt gets cleared */
|
||||
if (pExt == g_pGameExt)
|
||||
{
|
||||
g_pGameExt = NULL;
|
||||
}
|
||||
|
||||
delete pExt;
|
||||
|
||||
List<CExtension *>::iterator iter;
|
||||
@@ -904,6 +910,12 @@ void CExtensionManager::OnRootConsoleCommand(const char *cmd, unsigned int argco
|
||||
return;
|
||||
}
|
||||
|
||||
if (pExt == g_pGameExt)
|
||||
{
|
||||
g_RootMenu.ConsolePrint("[SM] Game extensions cannot be unloaded at this time.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (argcount > 4 && pExt->unload_code)
|
||||
{
|
||||
const char *unload = g_RootMenu.GetArgument(4);
|
||||
|
||||
Reference in New Issue
Block a user