1
0
mirror of https://github.com/alliedmodders/metamod-source.git synced 2024-12-01 13:24:25 +01:00

Adjusted MM:S loader for new ep2v engine iface change (bug 4752, r=DS).

This commit is contained in:
psychonic 2010-12-17 22:20:10 -05:00
parent ba867303b2
commit 70122da21c

View File

@ -281,22 +281,16 @@ mm_DetermineBackend(QueryValveInterface engineFactory, const char *game_name)
else if (engineFactory("VEngineServer021", NULL) != NULL) else if (engineFactory("VEngineServer021", NULL) != NULL)
{ {
/* Check for OB */ /* Check for OB */
if (engineFactory("VEngineCvar004", NULL) != NULL && if (engineFactory("VEngineCvar004", NULL) != NULL)
engineFactory("VModelInfoServer002", NULL) != NULL)
{ {
char lib_path[PLATFORM_MAX_PATH]; if (engineFactory("VModelInfoServer002", NULL) != NULL)
{
/* These would have failed already if they were going to? */ return MMBackend_Episode2;
mm_ResolvePath(STEAM_API_NAME, lib_path, sizeof(lib_path)); }
void *lib = mm_LoadLibrary(lib_path, NULL, 0); else if (engineFactory("VModelInfoServer003", NULL) != NULL)
void *steamapi_breakpad = mm_GetLibAddress(lib, "SteamAPI_SetBreakpadAppID");
mm_UnloadLibrary(lib);
if (steamapi_breakpad != NULL)
{ {
return MMBackend_Episode2Valve; return MMBackend_Episode2Valve;
} }
return MMBackend_Episode2;
} }
/* Check for Episode One/Old Engine */ /* Check for Episode One/Old Engine */
else if (engineFactory("VModelInfoServer001", NULL) != NULL && else if (engineFactory("VModelInfoServer001", NULL) != NULL &&