Fixed problem on OBV where alternately loaded plugins (CreateInterface_MMS) could be incorrectly told they were on the OB engine (bug 4491, r=dvander, a=blocking).

This only happened when there was more than one plugin that loaded this way. And the first plugin to load had to fail on OBV first so that OB could be tried. It was being permanently set to OB for future plugin loads and this caused problems.
This commit is contained in:
Scott Ehlert 2010-07-01 02:45:11 -05:00
parent bc43924d36
commit fba9d8e500

View File

@ -465,6 +465,7 @@ CPluginManager::CPlugin *CPluginManager::_Load(const char *file, PluginId source
{ {
GlobVersionInfo.source_engine = SOURCE_ENGINE_ORANGEBOX; GlobVersionInfo.source_engine = SOURCE_ENGINE_ORANGEBOX;
pl->m_API = fnLoad(&GlobVersionInfo, &info); pl->m_API = fnLoad(&GlobVersionInfo, &info);
GlobVersionInfo.source_engine = SOURCE_ENGINE_ORANGEBOXVALVE;
} }
#endif #endif
pl->m_UnloadFn = (METAMOD_FN_UNLOAD)dlsym(pl->m_Lib, "UnloadInterface_MMS"); pl->m_UnloadFn = (METAMOD_FN_UNLOAD)dlsym(pl->m_Lib, "UnloadInterface_MMS");