core/sourcemod.cpp
changeset 1380 eeb8d3b56155
parent 1371 d207f0e17532
child 1407 bb6516a50eea
     1.1 --- a/core/sourcemod.cpp	Mon Aug 27 14:02:22 2007 +0000
     1.2 +++ b/core/sourcemod.cpp	Wed Aug 29 00:27:54 2007 +0000
     1.3 @@ -50,6 +50,7 @@
     1.4  #include "MenuStyle_Radio.h"
     1.5  #include "Database.h"
     1.6  #include "HalfLife2.h"
     1.7 +#include "GameConfigs.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  SH_DECL_HOOK0_void(IServerGameDLL, LevelShutdown, SH_NOATTRIB, false);
    1.11 @@ -72,6 +73,7 @@
    1.12  bool g_Loaded = false;
    1.13  int g_StillFrames = 0;
    1.14  float g_StillTime = 0.0f;
    1.15 +IExtension *g_pGameExt = NULL;
    1.16  
    1.17  typedef int (*GIVEENGINEPOINTER)(ISourcePawnEngine *);
    1.18  typedef int (*GIVEENGINEPOINTER2)(ISourcePawnEngine *, unsigned int api_version);
    1.19 @@ -518,6 +520,15 @@
    1.20  	/* Load any auto extensions */
    1.21  	g_Extensions.TryAutoload();
    1.22  
    1.23 +	/* Load any game extension */
    1.24 +	const char *game_ext;
    1.25 +	if ((game_ext = g_pGameConf->GetKeyValue("GameExtension")) != NULL)
    1.26 +	{
    1.27 +		char path[PLATFORM_MAX_PATH];
    1.28 +		UTIL_Format(path, sizeof(path), "%s.ext." PLATFORM_LIB_EXT, game_ext);
    1.29 +		g_pGameExt = g_Extensions.LoadAutoExtension(path);
    1.30 +	}
    1.31 +
    1.32  	/* Run the first pass */
    1.33  	g_PluginSys.LoadAll_FirstPass(config_path, plugins_path);
    1.34