diff -r e82968c21606 -r 716af2e7be78 sourcemm/CSmmAPI.cpp --- a/sourcemm/CSmmAPI.cpp Tue Sep 18 20:03:47 2007 +0000 +++ b/sourcemm/CSmmAPI.cpp Tue Sep 18 20:35:29 2007 +0000 @@ -118,7 +118,7 @@ g_PluginMngr.RemovePluginCvar(plugin, pCommand); } - g_SMConVarAccessor.Unregister(pCommand); + g_SMConVarAccessor.Unregister(g_PluginMngr.FindByAPI(plugin)->m_Id, pCommand); } void CSmmAPI::ConPrint(const char *fmt) @@ -456,6 +456,7 @@ { size_t len; char engine_file[PATH_SIZE]; + char engine_path[PATH_SIZE]; char rel_path[PATH_SIZE * 2]; GetFileOfAddress(g_Engine.engine, engine_file, sizeof(engine_file)); @@ -471,9 +472,10 @@ break; } } + abspath(engine_path, engine_file); const char *usepath = g_SmmPath.c_str(); - if (UTIL_Relatize(rel_path, sizeof(rel_path), engine_file, g_SmmPath.c_str())) + if (UTIL_Relatize(rel_path, sizeof(rel_path), engine_path, g_SmmPath.c_str())) { usepath = rel_path; } @@ -666,3 +668,7 @@ return msg->name; } +int CSmmAPI::GetVSPVersion() +{ + return g_VspVersion; +}