added global class initializers

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40219
This commit is contained in:
David Anderson 2006-12-15 13:58:22 +00:00
parent a9087b13dd
commit 649b96ac9d

View File

@ -129,10 +129,27 @@ void SourceModBase::StartSourceMod(bool late)
/* First initialize the global hooks we need */
SH_ADD_HOOK_MEMFUNC(IServerGameDLL, LevelInit, gamedll, this, &SourceModBase::LevelInit, false);
m_IsLateLoadInMap = late;
/* Notify! */
SMGlobalClass *pBase = SMGlobalClass::head;
while (pBase)
{
pBase->OnSourceModStartup(m_IsLateLoadInMap);
pBase = pBase->m_pGlobalClassNext;
}
/* Notify! */
pBase = SMGlobalClass::head;
while (pBase)
{
pBase->OnSourceModAllInitialized();
pBase = pBase->m_pGlobalClassNext;
}
/* If we're late, automatically load plugins now */
if (late)
{
m_IsLateLoadInMap = late;
DoGlobalPluginLoads();
}
}