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:
David Anderson
2007-08-29 00:27:54 +00:00
parent 437f6543d7
commit 6bb7b3a1f8
3 changed files with 24 additions and 0 deletions
+12
View File
@@ -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);