diff --git a/AMBuildScript b/AMBuildScript index 74f49b6..2b09e43 100644 --- a/AMBuildScript +++ b/AMBuildScript @@ -13,16 +13,18 @@ class MMS: 'name': 'EPISODEONE', 'platform': ['windows', 'linux']} self.sdkInfo['ep2'] = {'sdk': 'HL2SDKOB', 'ext': '2.ep2', 'def': '3', 'name': 'ORANGEBOX', 'platform': ['windows', 'linux']} - self.sdkInfo['ep2v'] = {'sdk': 'HL2SDKOBVALVE', 'ext': '2.ep2v', 'def': '4', + self.sdkInfo['ep2v'] = {'sdk': 'HL2SDKOBVALVE', 'ext': '2.ep2v', 'def': '5', 'name': 'ORANGEBOXVALVE', 'platform': ['windows', 'linux', 'darwin']} - self.sdkInfo['l4d'] = {'sdk': 'HL2SDKL4D', 'ext': '2.l4d', 'def': '5', + self.sdkInfo['l4d'] = {'sdk': 'HL2SDKL4D', 'ext': '2.l4d', 'def': '6', 'name': 'LEFT4DEAD', 'platform': ['windows', 'linux', 'darwin']} - self.sdkInfo['l4d2'] = {'sdk': 'HL2SDKL4D2', 'ext': '2.l4d2', 'def': '6', + self.sdkInfo['l4d2'] = {'sdk': 'HL2SDKL4D2', 'ext': '2.l4d2', 'def': '7', 'name': 'LEFT4DEAD2', 'platform': ['windows', 'linux', 'darwin']} self.sdkInfo['darkm'] = {'sdk': 'HL2SDK-DARKM', 'ext': '2.darkm', 'def': '2', 'name': 'DARKMESSIAH', 'platform': ['windows']} - self.sdkInfo['swarm'] = {'sdk': 'HL2SDK-SWARM', 'ext': '2.swarm', 'def': '7', + self.sdkInfo['swarm'] = {'sdk': 'HL2SDK-SWARM', 'ext': '2.swarm', 'def': '8', 'name': 'ALIENSWARM', 'platform': ['windows']} + self.sdkInfo['bgt'] = {'sdk': 'HL2SDK-BGT', 'ext': '2.bgt', 'def': '4', + 'name': 'BLOODYGOODTIME', 'platform': ['windows']} if AMBuild.mode == 'config': #Detect compilers @@ -42,6 +44,7 @@ class MMS: if AMBuild.target['platform'] == 'windows': envvars['HL2SDK-DARKM'] = 'hl2sdk-darkm' envvars['HL2SDK-SWARM'] = 'hl2sdk-swarm' + envvars['HL2SDK-BGT'] = 'hl2sdk-bgt' #Must have a path for each envvar (file a bug if you don't like this) for i in envvars: diff --git a/core/ISmmPluginExt.h b/core/ISmmPluginExt.h index 13dbcb5..bcf8abc 100644 --- a/core/ISmmPluginExt.h +++ b/core/ISmmPluginExt.h @@ -44,6 +44,7 @@ #define SOURCE_ENGINE_ORANGEBOXVALVE 6 /**< Orange Box Source Engine for Valve games (TF2/DOD:S) */ #define SOURCE_ENGINE_LEFT4DEAD2 7 /**< Left 4 Dead 2 */ #define SOURCE_ENGINE_ALIENSWARM 8 /**< Alien Swarm */ +#define SOURCE_ENGINE_BLOODYGOODTIME 9 /**< Bloody Good Time */ #define METAMOD_PLAPI_VERSION 15 /**< Version of this header file */ #define METAMOD_PLAPI_NAME "ISmmPlugin" /**< Name of the plugin interface */ diff --git a/core/metamod_console.cpp b/core/metamod_console.cpp index 56bc21e..84b0066 100644 --- a/core/metamod_console.cpp +++ b/core/metamod_console.cpp @@ -111,7 +111,9 @@ bool Command_Meta(IMetamodSourceCommandInfo *info) } #endif -#if SOURCE_ENGINE == SE_ALIENSWARM +#if SOURCE_ENGINE == SE_BLOODYGOODTIME + CONMSG(" Engine: Bloody Good Time (2010)\n"); +#elif SOURCE_ENGINE == SE_ALIENSWARM CONMSG(" Engine: Alien Swarm (2010)\n"); #elif SOURCE_ENGINE == SE_LEFT4DEAD2 CONMSG(" Engine: Left 4 Dead 2 (2009)\n"); diff --git a/core/provider/provider_ep2.cpp b/core/provider/provider_ep2.cpp index af2a95e..688a310 100644 --- a/core/provider/provider_ep2.cpp +++ b/core/provider/provider_ep2.cpp @@ -358,7 +358,9 @@ const char *BaseProvider::GetGameDescription() int BaseProvider::DetermineSourceEngine(const char *game) { -#if SOURCE_ENGINE == SE_ALIENSWARM +#if SOURCE_ENGINE == SE_BLOODYGOODTIME + return SOURCE_ENGINE_BLOODYGOODTIME; +#elif SOURCE_ENGINE == SE_ALIENSWARM return SOURCE_ENGINE_ALIENSWARM; #elif SOURCE_ENGINE == SE_LEFT4DEAD2 return SOURCE_ENGINE_LEFT4DEAD2; diff --git a/loader/loader.cpp b/loader/loader.cpp index 0912ec7..48b4c71 100644 --- a/loader/loader.cpp +++ b/loader/loader.cpp @@ -73,6 +73,7 @@ static const char *backend_names[] = "1.ep1", "2.darkm", "2.ep2", + "2.bgt", "2.ep2v", "2.l4d", "2.l4d2", @@ -285,7 +286,15 @@ mm_DetermineBackend(QueryValveInterface engineFactory, const char *game_name) { if (engineFactory("VModelInfoServer002", NULL) != NULL) { - return MMBackend_Episode2; + /* BGT has same iface version numbers and libs as ep2 */ + if (strcmp(game_name, "pm") == 0) + { + return MMBackend_BloodyGoodTime; + } + else + { + return MMBackend_Episode2; + } } else if (engineFactory("VModelInfoServer003", NULL) != NULL) { diff --git a/loader/loader.h b/loader/loader.h index a6543fa..ef93fde 100644 --- a/loader/loader.h +++ b/loader/loader.h @@ -83,6 +83,7 @@ enum MetamodBackend MMBackend_Episode1 = 0, MMBackend_DarkMessiah, MMBackend_Episode2, + MMBackend_BloodyGoodTime, MMBackend_Episode2Valve, MMBackend_Left4Dead, MMBackend_Left4Dead2,