core/sourcemod.cpp
changeset 211 4c77142eaf36
parent 209 fae1894d884c
child 213 2bec1ff85d06
     1.1 --- a/core/sourcemod.cpp	Wed Dec 13 11:19:46 2006 +0000
     1.2 +++ b/core/sourcemod.cpp	Fri Dec 15 13:38:04 2006 +0000
     1.3 @@ -130,12 +130,17 @@
     1.4  	SH_ADD_HOOK_MEMFUNC(IServerGameDLL, LevelInit, gamedll, this, &SourceModBase::LevelInit, false);
     1.5  
     1.6  	/* If we're late, automatically load plugins now */
     1.7 -	DoGlobalPluginLoads();
     1.8 +	if (late)
     1.9 +	{
    1.10 +		m_IsLateLoadInMap = late;
    1.11 +		DoGlobalPluginLoads();
    1.12 +	}
    1.13  }
    1.14  
    1.15  bool SourceModBase::LevelInit(char const *pMapName, char const *pMapEntities, char const *pOldLevel, char const *pLandmarkName, bool loadGame, bool background)
    1.16  {
    1.17  	m_IsMapLoading = true;
    1.18 +	m_IsLateLoadInMap = false;
    1.19  
    1.20  	DoGlobalPluginLoads();
    1.21  
    1.22 @@ -158,10 +163,23 @@
    1.23  		"%s/plugins",
    1.24  		GetSMBaseDir());
    1.25  
    1.26 -	g_PluginMngr.RefreshOrLoadPlugins(config_path, plugins_path);
    1.27 +	g_PluginSys.LoadAll_FirstPass(config_path, plugins_path);
    1.28 +}
    1.29 +
    1.30 +bool SourceModBase::IsLateLoadInMap()
    1.31 +{
    1.32 +	return m_IsLateLoadInMap;
    1.33  }
    1.34  
    1.35  const char *SourceModBase::GetSMBaseDir()
    1.36  {
    1.37  	return m_SMBaseDir;
    1.38  }
    1.39 +
    1.40 +SMGlobalClass *SMGlobalClass::head = NULL;
    1.41 +
    1.42 +SMGlobalClass::SMGlobalClass()
    1.43 +{
    1.44 +	m_pGlobalClassNext = SMGlobalClass::head;
    1.45 +	SMGlobalClass::head = this;
    1.46 +}