diff --git a/sourcemm/CSmmAPI.cpp b/sourcemm/CSmmAPI.cpp index 42b21ca..04a0ef9 100644 --- a/sourcemm/CSmmAPI.cpp +++ b/sourcemm/CSmmAPI.cpp @@ -145,15 +145,15 @@ void *CSmmAPI::MetaFactory(const char *iface, int *_ret, PluginId *id) return NULL; //first check ours... we get first chance! - if (strcmp(iface, MMIFACE_SOURCEHOOK)==0) + if (strcmp(iface, MMIFACE_SOURCEHOOK) == 0) { if (_ret) *_ret = IFACE_OK; return static_cast<void *>(static_cast<SourceHook::ISourceHook *>(&g_SourceHook)); - } else if (strcmp(iface, MMIFACE_PLMANAGER)==0) { + } else if (strcmp(iface, MMIFACE_PLMANAGER) == 0) { if (_ret) *_ret = IFACE_OK; - return static_cast<void *>(static_cast<IConCommandBaseAccessor *>(&g_SMConVarAccessor)); + return static_cast<void *>(static_cast<ISmmPluginManager *>(&g_PluginMngr)); } CPluginManager::CPlugin *pl; diff --git a/sourcemm/changelog.txt b/sourcemm/changelog.txt index f7f3a02..7bddf0c 100644 --- a/sourcemm/changelog.txt +++ b/sourcemm/changelog.txt @@ -4,6 +4,8 @@ - Fixed bug where Metamod:Source could load the wrong GameDLL and/or load more than one GameDLL. This issue occured in HL2 CTF, SourceForts, or any other mod that relied on files from another mod directory. + - Fixed bug where ISmmAPI::MetaFactory would return the wrong interface when trying to + retrieve ISmmPluginManager. - Fixed bug where returning false in Load() after adding a Metamod event listener or hooking a function could cause a crash instead of rejecting the plugin. - Fixed bug where trying to load Metamod:Source a second time as a SourceMM or Valve