1.1 --- a/sourcemm/sourcemm.cpp Fri Dec 23 23:32:21 2005 +0000
1.2 +++ b/sourcemm/sourcemm.cpp Fri Dec 23 23:38:38 2005 +0000
1.3 @@ -92,7 +92,7 @@
1.4 GetFileOfAddress(g_GameDll.factory, full_path, sizeof(full_path)-1);
1.5 g_BinPath.assign(full_path);
1.6
1.7 - UTIL_PathFmt(full_path, sizeof(full_path)-1, "%s/%s", g_ModPath.c_str(), GetPluginsFile());
1.8 + g_SmmAPI.PathFormat(full_path, sizeof(full_path)-1, "%s/%s", g_ModPath.c_str(), GetPluginsFile());
1.9
1.10 //Like metamod, reload plugins at the end of the map.
1.11 //This is so plugins can hook everything on load, BUT, new plugins will be reloaded
1.12 @@ -138,7 +138,7 @@
1.13 }
1.14
1.15 char full_path[260];
1.16 - UTIL_PathFmt(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(), GetPluginsFile());
1.18
1.19 LoadPluginsFromFile(full_path);
1.20
1.21 @@ -304,9 +304,9 @@
1.22 //no need to append "bin"
1.23 if (gamebin)
1.24 {
1.25 - UTIL_PathFmt(temp_path, sizeof(temp_path)-1, "%s/%s/%s", lptr, ptr, SERVER_DLL);
1.26 + g_SmmAPI.PathFormat(temp_path, sizeof(temp_path)-1, "%s/%s/%s", lptr, ptr, SERVER_DLL);
1.27 } else {
1.28 - UTIL_PathFmt(temp_path, sizeof(temp_path)-1, "%s/%s/%s/%s", lptr, ptr, "bin", SERVER_DLL);
1.29 + g_SmmAPI.PathFormat(temp_path, sizeof(temp_path)-1, "%s/%s/%s/%s", lptr, ptr, "bin", SERVER_DLL);
1.30 }
1.31 if (!UTIL_PathCmp(s_dllpath.c_str(), temp_path))
1.32 {
1.33 @@ -504,7 +504,7 @@
1.34 ext = "";
1.35 }
1.36 //Format the new path
1.37 - UTIL_PathFmt(full_path, sizeof(full_path)-1, "%s/%s%s", g_ModPath.c_str(), buffer, ext);
1.38 + g_SmmAPI.PathFormat(full_path, sizeof(full_path)-1, "%s/%s%s", g_ModPath.c_str(), buffer, ext);
1.39 id = g_PluginMngr.Load(full_path, Pl_File, already, error, sizeof(error)-1);
1.40 if (id < Pl_MinId || g_PluginMngr.FindById(id)->m_Status < Pl_Paused)
1.41 {
1.42 @@ -598,6 +598,10 @@
1.43 LogMessage("[META] Warning: Console messages will not be redirected to rcon console.");
1.44 }
1.45
1.46 +#if (defined _DEBUG || defined DEBUG) && (defined WIN32 || defined _WIN32)
1.47 + SetUnhandledExceptionFilter(NULL);
1.48 +#endif
1.49 +
1.50 ITER_EVENT(OnLevelInit, (pMapName, pMapEntities, pOldLevel, pLandmarkName, loadGame, background));
1.51
1.52 RETURN_META_VALUE(MRES_IGNORED, false);