core/sourcemod.cpp
changeset 3872 4c93f74cae51
parent 3819 d17aed3d46bf
child 3883 ee82b6ecc09d
     1.1 --- a/core/sourcemod.cpp	Fri Mar 29 12:28:02 2013 -0400
     1.2 +++ b/core/sourcemod.cpp	Fri Mar 29 11:37:29 2013 -0700
     1.3 @@ -34,11 +34,8 @@
     1.4  #include "sourcemm_api.h"
     1.5  #include "LibrarySys.h"
     1.6  #include <sh_string.h>
     1.7 -#include "PluginSys.h"
     1.8 -#include "ShareSys.h"
     1.9  #include "CoreConfig.h"
    1.10  #include "Logger.h"
    1.11 -#include "ExtensionSys.h"
    1.12  #include "AdminCache.h"
    1.13  #include "sm_stringutil.h"
    1.14  #include "PlayerManager.h"
    1.15 @@ -263,11 +260,6 @@
    1.16  	enginePatch = SH_GET_CALLCLASS(engine);
    1.17  	gamedllPatch = SH_GET_CALLCLASS(gamedll);
    1.18  
    1.19 -	g_ShareSys.Initialize();
    1.20 -
    1.21 -	/* Make the global core identity */
    1.22 -	g_pCoreIdent = g_ShareSys.CreateCoreIdentity();
    1.23 -
    1.24  	InitLogicBridge();
    1.25  
    1.26  	/* Notify! */
    1.27 @@ -296,7 +288,7 @@
    1.28  	}
    1.29  
    1.30  	/* Add us now... */
    1.31 -	g_ShareSys.AddInterface(NULL, this);
    1.32 +	sharesys->AddInterface(NULL, this);
    1.33  
    1.34  	/* We're loaded! */
    1.35  	g_Loaded = true;
    1.36 @@ -311,7 +303,7 @@
    1.37  	const char *disabled = GetCoreConfigValue("DisableAutoUpdate");
    1.38  	if (disabled == NULL || strcasecmp(disabled, "yes") != 0)
    1.39  	{
    1.40 -		g_Extensions.LoadAutoExtension("updater.ext." PLATFORM_LIB_EXT);
    1.41 +		extsys->LoadAutoExtension("updater.ext." PLATFORM_LIB_EXT);
    1.42  	}
    1.43  }
    1.44  
    1.45 @@ -383,7 +375,7 @@
    1.46  
    1.47  	if (m_ExecPluginReload)
    1.48  	{
    1.49 -		g_PluginSys.ReloadOrUnloadPlugins();
    1.50 +		scripts->RefreshAll();
    1.51  		m_ExecPluginReload = false;
    1.52  	}
    1.53  }
    1.54 @@ -406,7 +398,7 @@
    1.55  		"plugins");
    1.56  
    1.57  	/* Load any auto extensions */
    1.58 -	g_Extensions.TryAutoload();
    1.59 +	extsys->TryAutoload();
    1.60  
    1.61  	/* Fire the extensions ready message */
    1.62  	g_SMAPI->MetaFactory(SOURCEMOD_NOTICE_EXTENSIONS, NULL, NULL);
    1.63 @@ -417,23 +409,10 @@
    1.64  	{
    1.65  		char path[PLATFORM_MAX_PATH];
    1.66  		UTIL_Format(path, sizeof(path), "%s.ext." PLATFORM_LIB_EXT, game_ext);
    1.67 -		g_Extensions.LoadAutoExtension(path);
    1.68 +		extsys->LoadAutoExtension(path);
    1.69  	}
    1.70  
    1.71 -	/* Run the first pass */
    1.72 -	g_PluginSys.LoadAll_FirstPass(config_path, plugins_path);
    1.73 -
    1.74 -	/* Mark any extensions as loaded */
    1.75 -	g_Extensions.MarkAllLoaded();
    1.76 -
    1.77 -	/* No modules yet, it's safe to call this from here */
    1.78 -	g_PluginSys.LoadAll_SecondPass();
    1.79 -
    1.80 -	/* Re-mark any extensions as loaded */
    1.81 -	g_Extensions.MarkAllLoaded();
    1.82 -
    1.83 -	/* Call OnAllPluginsLoaded */
    1.84 -	g_PluginSys.AllPluginsLoaded();
    1.85 +	scripts->LoadAll(config_path, plugins_path);
    1.86  }
    1.87  
    1.88  size_t SourceModBase::BuildPath(PathType type, char *buffer, size_t maxlength, const char *format, ...)
    1.89 @@ -484,10 +463,10 @@
    1.90  	LevelShutdown();
    1.91  
    1.92  	/* Unload plugins */
    1.93 -	g_PluginSys.Shutdown();
    1.94 +	scripts->Shutdown();
    1.95  
    1.96  	/* Unload extensions */
    1.97 -	g_Extensions.Shutdown();
    1.98 +	extsys->Shutdown();
    1.99  
   1.100  	SH_REMOVE_HOOK(IServerGameDLL, LevelInit, gamedll, SH_MEMBER(this, &SourceModBase::LevelInit), false);
   1.101