diff -r 76da01197c4c -r e85ebcf21a7e sourcemm/sourcemm.cpp --- a/sourcemm/sourcemm.cpp Fri Dec 23 23:32:21 2005 +0000 +++ b/sourcemm/sourcemm.cpp Fri Dec 23 23:38:38 2005 +0000 @@ -92,7 +92,7 @@ GetFileOfAddress(g_GameDll.factory, full_path, sizeof(full_path)-1); g_BinPath.assign(full_path); - UTIL_PathFmt(full_path, sizeof(full_path)-1, "%s/%s", g_ModPath.c_str(), GetPluginsFile()); + g_SmmAPI.PathFormat(full_path, sizeof(full_path)-1, "%s/%s", g_ModPath.c_str(), GetPluginsFile()); //Like metamod, reload plugins at the end of the map. //This is so plugins can hook everything on load, BUT, new plugins will be reloaded @@ -138,7 +138,7 @@ } char full_path[260]; - UTIL_PathFmt(full_path, sizeof(full_path)-1, "%s/%s", g_ModPath.c_str(), GetPluginsFile()); + g_SmmAPI.PathFormat(full_path, sizeof(full_path)-1, "%s/%s", g_ModPath.c_str(), GetPluginsFile()); LoadPluginsFromFile(full_path); @@ -304,9 +304,9 @@ //no need to append "bin" if (gamebin) { - UTIL_PathFmt(temp_path, sizeof(temp_path)-1, "%s/%s/%s", lptr, ptr, SERVER_DLL); + g_SmmAPI.PathFormat(temp_path, sizeof(temp_path)-1, "%s/%s/%s", lptr, ptr, SERVER_DLL); } else { - UTIL_PathFmt(temp_path, sizeof(temp_path)-1, "%s/%s/%s/%s", lptr, ptr, "bin", SERVER_DLL); + g_SmmAPI.PathFormat(temp_path, sizeof(temp_path)-1, "%s/%s/%s/%s", lptr, ptr, "bin", SERVER_DLL); } if (!UTIL_PathCmp(s_dllpath.c_str(), temp_path)) { @@ -504,7 +504,7 @@ ext = ""; } //Format the new path - UTIL_PathFmt(full_path, sizeof(full_path)-1, "%s/%s%s", g_ModPath.c_str(), buffer, ext); + g_SmmAPI.PathFormat(full_path, sizeof(full_path)-1, "%s/%s%s", g_ModPath.c_str(), buffer, ext); id = g_PluginMngr.Load(full_path, Pl_File, already, error, sizeof(error)-1); if (id < Pl_MinId || g_PluginMngr.FindById(id)->m_Status < Pl_Paused) { @@ -598,6 +598,10 @@ LogMessage("[META] Warning: Console messages will not be redirected to rcon console."); } +#if (defined _DEBUG || defined DEBUG) && (defined WIN32 || defined _WIN32) + SetUnhandledExceptionFilter(NULL); +#endif + ITER_EVENT(OnLevelInit, (pMapName, pMapEntities, pOldLevel, pLandmarkName, loadGame, background)); RETURN_META_VALUE(MRES_IGNORED, false);