sourcemm/sourcemm.cpp
changeset 190 718f99cad77d
parent 175 b497b7777f6b
child 191 2d0dbd03c503
     1.1 --- a/sourcemm/sourcemm.cpp	Wed Apr 19 23:47:25 2006 +0000
     1.2 +++ b/sourcemm/sourcemm.cpp	Fri Apr 21 01:58:22 2006 +0000
     1.3 @@ -92,8 +92,6 @@
     1.4  	GetFileOfAddress(g_GameDll.factory, full_path, sizeof(full_path)-1);
     1.5  	g_BinPath.assign(full_path);
     1.6  
     1.7 -	g_SmmAPI.PathFormat(full_path, sizeof(full_path)-1, "%s/%s", g_ModPath.c_str(), GetPluginsFile());
     1.8 -
     1.9  	//Like metamod, reload plugins at the end of the map.
    1.10  	//This is so plugins can hook everything on load, BUT, new plugins will be reloaded
    1.11  	// if the server is shut down (silly, but rare case).
    1.12 @@ -138,7 +136,7 @@
    1.13  	}
    1.14  
    1.15  	char full_path[260];
    1.16 -	g_SmmAPI.PathFormat(full_path, sizeof(full_path)-1, "%s/%s", g_ModPath.c_str(), GetPluginsFile());
    1.17 +	g_SmmAPI.PathFormat(full_path, sizeof(full_path)-1, "%s/%s", g_ModPath.c_str(), g_Engine.icvar->GetCommandLineValue("mm_pluginsfile"));
    1.18  
    1.19  	LoadPluginsFromFile(full_path);
    1.20  
    1.21 @@ -575,11 +573,8 @@
    1.22  	if (!bInFirstLevel)
    1.23  	{
    1.24  		char full_path[255];
    1.25 -#if defined WIN32 || defined _WIN32
    1.26 -		snprintf(full_path, sizeof(full_path)-1, "%s\\addons\\metamod\\%s", g_ModPath.c_str(), "metaplugins.ini");
    1.27 -#else
    1.28 -		snprintf(full_path, sizeof(full_path)-1, "%s/addons/metamod/%s", g_ModPath.c_str(), "metaplugins.ini");
    1.29 -#endif
    1.30 +		g_SmmAPI.PathFormat(full_path, sizeof(full_path) - 1, "%s/%s", g_ModPath.c_str(), GetPluginsFile());
    1.31 +
    1.32  		LoadPluginsFromFile(full_path);
    1.33  	} else {
    1.34  		bInFirstLevel = false;
    1.35 @@ -591,14 +586,14 @@
    1.36  }
    1.37  
    1.38  bool LevelInit_handler(char const *pMapName, char const *pMapEntities, char const *pOldLevel, char const *pLandmarkName, bool loadGame, bool background)
    1.39 -{ 
    1.40 +{
    1.41  	if (!g_SmmAPI.CacheSuccessful())
    1.42  	{
    1.43  		LogMessage("[META] Warning: Failed to initialize Con_Printf.  Defaulting to Msg().");
    1.44  		LogMessage("[META] Warning: Console messages will not be redirected to rcon console.");
    1.45  	}
    1.46  
    1.47 -#if (defined _DEBUG || defined DEBUG) && (defined WIN32 || defined _WIN32)
    1.48 +#if (defined _DEBUG || defined DEBUG) && (defined OS_WIN32)
    1.49      SetUnhandledExceptionFilter(NULL);
    1.50  #endif
    1.51