core/sourcemod.cpp
changeset 315 5f48300aa103
parent 289 87ad530d141b
child 317 e5342c8a0cf4
     1.1 --- a/core/sourcemod.cpp	Thu Jan 18 21:07:10 2007 +0000
     1.2 +++ b/core/sourcemod.cpp	Thu Jan 18 23:28:14 2007 +0000
     1.3 @@ -7,6 +7,7 @@
     1.4  #include "PluginSys.h"
     1.5  #include "ShareSys.h"
     1.6  #include "CLogger.h"
     1.7 +#include "ExtensionSys.h"
     1.8  
     1.9  SH_DECL_HOOK6(IServerGameDLL, LevelInit, SH_NOATTRIB, false, bool, const char *, const char *, const char *, const char *, bool, bool);
    1.10  
    1.11 @@ -131,13 +132,11 @@
    1.12  	/* First initialize the global hooks we need */
    1.13  	SH_ADD_HOOK_MEMFUNC(IServerGameDLL, LevelInit, gamedll, this, &SourceModBase::LevelInit, false);
    1.14  
    1.15 -	m_IsLateLoadInMap = late;
    1.16 -
    1.17  	/* Notify! */
    1.18  	SMGlobalClass *pBase = SMGlobalClass::head;
    1.19  	while (pBase)
    1.20  	{
    1.21 -		pBase->OnSourceModStartup(m_IsLateLoadInMap);
    1.22 +		pBase->OnSourceModStartup(false);
    1.23  		pBase = pBase->m_pGlobalClassNext;
    1.24  	}
    1.25  
    1.26 @@ -156,7 +155,6 @@
    1.27  bool SourceModBase::LevelInit(char const *pMapName, char const *pMapEntities, char const *pOldLevel, char const *pLandmarkName, bool loadGame, bool background)
    1.28  {
    1.29  	m_IsMapLoading = true;
    1.30 -	m_IsLateLoadInMap = false;
    1.31  
    1.32  	g_Logger.MapChange(pMapName);
    1.33  
    1.34 @@ -167,6 +165,11 @@
    1.35  	RETURN_META_VALUE(MRES_IGNORED, true);
    1.36  }
    1.37  
    1.38 +bool SourceModBase::IsMapLoading()
    1.39 +{
    1.40 +	return m_IsMapLoading;
    1.41 +}
    1.42 +
    1.43  void SourceModBase::DoGlobalPluginLoads()
    1.44  {
    1.45  	char config_path[PLATFORM_MAX_PATH];
    1.46 @@ -181,10 +184,17 @@
    1.47  		"%s/plugins",
    1.48  		GetSMBaseDir());
    1.49  
    1.50 +	/* Run the first pass */
    1.51  	g_PluginSys.LoadAll_FirstPass(config_path, plugins_path);
    1.52  
    1.53 +	/* Mark any extensions as loaded */
    1.54 +	g_Extensions.MarkAllLoaded();
    1.55 +
    1.56  	/* No modules yet, it's safe to call this from here */
    1.57  	g_PluginSys.LoadAll_SecondPass();
    1.58 +
    1.59 +	/* Re-mark any extensions as loaded */
    1.60 +	g_Extensions.MarkAllLoaded();
    1.61  }
    1.62  
    1.63  void SourceModBase::CloseSourceMod()
    1.64 @@ -209,11 +219,6 @@
    1.65  	ShutdownJIT();
    1.66  }
    1.67  
    1.68 -bool SourceModBase::IsLateLoadInMap()
    1.69 -{
    1.70 -	return m_IsLateLoadInMap;
    1.71 -}
    1.72 -
    1.73  const char *SourceModBase::GetSMBaseDir()
    1.74  {
    1.75  	return m_SMBaseDir;