loader/loader.cpp
changeset 703 ce677af0e3b5
parent 697 29b113bf1c9e
child 705 a1001281dcb1
     1.1 --- a/loader/loader.cpp	Thu May 13 19:45:20 2010 -0500
     1.2 +++ b/loader/loader.cpp	Wed May 12 22:56:31 2010 -0700
     1.3 @@ -263,7 +263,15 @@
     1.4  		if (engineFactory("VEngineCvar004", NULL) != NULL &&
     1.5  			engineFactory("VModelInfoServer002", NULL) != NULL)
     1.6  		{
     1.7 -			if (strcmp(game_name, "tf") == 0 || strcmp(game_name, "dod") == 0)
     1.8 +			char lib_path[PLATFORM_MAX_PATH];
     1.9 +
    1.10 +			/* These would have failed already if they were going to? */
    1.11 +			mm_ResolvePath(TIER0_NAME, lib_path, sizeof(lib_path));
    1.12 +			void *lib = mm_LoadLibrary(lib_path, NULL, 0);
    1.13 +			void *tier0_ctime = mm_GetLibAddress(lib, "Plat_ctime");
    1.14 +			mm_UnloadLibrary(lib);
    1.15 +
    1.16 +			if (tier0_ctime != NULL)
    1.17  			{
    1.18  				return MMBackend_Episode2Valve;
    1.19  			}