1.1 --- a/sourcemm/CSmmAPI.cpp Tue Sep 18 20:03:47 2007 +0000
1.2 +++ b/sourcemm/CSmmAPI.cpp Tue Sep 18 20:35:29 2007 +0000
1.3 @@ -118,7 +118,7 @@
1.4 g_PluginMngr.RemovePluginCvar(plugin, pCommand);
1.5 }
1.6
1.7 - g_SMConVarAccessor.Unregister(pCommand);
1.8 + g_SMConVarAccessor.Unregister(g_PluginMngr.FindByAPI(plugin)->m_Id, pCommand);
1.9 }
1.10
1.11 void CSmmAPI::ConPrint(const char *fmt)
1.12 @@ -456,6 +456,7 @@
1.13 {
1.14 size_t len;
1.15 char engine_file[PATH_SIZE];
1.16 + char engine_path[PATH_SIZE];
1.17 char rel_path[PATH_SIZE * 2];
1.18
1.19 GetFileOfAddress(g_Engine.engine, engine_file, sizeof(engine_file));
1.20 @@ -471,9 +472,10 @@
1.21 break;
1.22 }
1.23 }
1.24 + abspath(engine_path, engine_file);
1.25
1.26 const char *usepath = g_SmmPath.c_str();
1.27 - if (UTIL_Relatize(rel_path, sizeof(rel_path), engine_file, g_SmmPath.c_str()))
1.28 + if (UTIL_Relatize(rel_path, sizeof(rel_path), engine_path, g_SmmPath.c_str()))
1.29 {
1.30 usepath = rel_path;
1.31 }
1.32 @@ -666,3 +668,7 @@
1.33
1.34 return msg->name;
1.35 }
1.36 +int CSmmAPI::GetVSPVersion()
1.37 +{
1.38 + return g_VspVersion;
1.39 +}