From 2b015a1d5b32353bbef15ed90d900f924f8bfb9e Mon Sep 17 00:00:00 2001 From: Nicholas Hastings Date: Sat, 29 Mar 2014 14:14:00 -0400 Subject: [PATCH] Add support for Contagion (bug 6007, r=asherkin). --- AMBuildScript | 15 ++++++++------- core/logic_bridge.cpp | 4 ++++ core/smn_halflife.cpp | 1 + loader/loader.cpp | 6 ++++++ plugins/include/halflife.inc | 1 + 5 files changed, 20 insertions(+), 7 deletions(-) diff --git a/AMBuildScript b/AMBuildScript index d68d4cdf..af0b6cf3 100644 --- a/AMBuildScript +++ b/AMBuildScript @@ -30,16 +30,17 @@ PossibleSDKs = { 'tf2': SDK('HL2SDKTF2', '2.tf2', '10', 'TF2', WinLinuxMac, 'tf2'), 'l4d': SDK('HL2SDKL4D', '2.l4d', '11', 'LEFT4DEAD', WinLinuxMac, 'l4d'), 'nd': SDK('HL2SDKND', '2.nd', '12', 'NUCLEARDAWN', WinLinuxMac, 'nd'), - 'l4d2': SDK('HL2SDKL4D2', '2.l4d2', '13', 'LEFT4DEAD2', WinLinuxMac, 'l4d2'), + 'l4d2': SDK('HL2SDKL4D2', '2.l4d2', '14', 'LEFT4DEAD2', WinLinuxMac, 'l4d2'), 'darkm': SDK('HL2SDK-DARKM', '2.darkm', '2', 'DARKMESSIAH', WinOnly, 'darkm'), - 'swarm': SDK('HL2SDK-SWARM', '2.swarm', '14', 'ALIENSWARM', WinOnly, 'swarm'), + 'swarm': SDK('HL2SDK-SWARM', '2.swarm', '15', 'ALIENSWARM', WinOnly, 'swarm'), 'bgt': SDK('HL2SDK-BGT', '2.bgt', '4', 'BLOODYGOODTIME', WinOnly, 'bgt'), 'eye': SDK('HL2SDK-EYE', '2.eye', '5', 'EYE', WinOnly, 'eye'), - 'csgo': SDK('HL2SDKCSGO', '2.csgo', '18', 'CSGO', WinLinuxMac, 'csgo'), - 'dota': SDK('HL2SDKDOTA', '2.dota', '19', 'DOTA', WinLinuxMac, 'dota'), - 'portal2': SDK('HL2SDKPORTAL2', '2.portal2', '15', 'PORTAL2', [], 'portal2'), - 'blade': SDK('HL2SDKBLADE', '2.blade', '16', 'BLADE', WinLinux, 'blade'), - 'insurgency': SDK('HL2SDKINSURGENCY', '2.insurgency', '17', 'INSURGENCY', WinLinuxMac, 'insurgency'), + 'csgo': SDK('HL2SDKCSGO', '2.csgo', '19', 'CSGO', WinLinuxMac, 'csgo'), + 'dota': SDK('HL2SDKDOTA', '2.dota', '20', 'DOTA', WinLinuxMac, 'dota'), + 'portal2': SDK('HL2SDKPORTAL2', '2.portal2', '16', 'PORTAL2', [], 'portal2'), + 'blade': SDK('HL2SDKBLADE', '2.blade', '17', 'BLADE', WinLinux, 'blade'), + 'insurgency': SDK('HL2SDKINSURGENCY', '2.insurgency', '18', 'INSURGENCY', WinLinuxMac, 'insurgency'), + 'contagion': SDK('HL2SDKCONTAGION', '2.contagion', '13', 'CONTAGION', WinOnly, 'contagion'), } def ResolveEnvPath(env, folder): diff --git a/core/logic_bridge.cpp b/core/logic_bridge.cpp index e386d55c..0844a9f5 100644 --- a/core/logic_bridge.cpp +++ b/core/logic_bridge.cpp @@ -247,6 +247,8 @@ static const char *get_source_engine_name() return "left4dead"; #elif SOURCE_ENGINE == SE_NUCLEARDAWN return "nucleardawn"; +#elif SOURCE_ENGINE == SE_CONTAGION + return "contagion"; #elif SOURCE_ENGINE == SE_LEFT4DEAD2 return "left4dead2"; #elif SOURCE_ENGINE == SE_ALIENSWARM @@ -398,6 +400,8 @@ void do_global_plugin_loads() #define GAMEFIX "2.csgo" #elif SOURCE_ENGINE == SE_DOTA #define GAMEFIX "2.dota" +#elif SOURCE_ENGINE == SE_CONTAGION +#define GAMEFIX "2.contagion" #else #define GAMEFIX "2.ep1" #endif //(SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2) diff --git a/core/smn_halflife.cpp b/core/smn_halflife.cpp index 6adf7bda..b724138b 100644 --- a/core/smn_halflife.cpp +++ b/core/smn_halflife.cpp @@ -502,6 +502,7 @@ static cell_t GuessSDKVersion(IPluginContext *pContext, const cell_t *params) case SOURCE_ENGINE_LEFT4DEAD: return 40; case SOURCE_ENGINE_NUCLEARDAWN: + case SOURCE_ENGINE_CONTAGION: case SOURCE_ENGINE_LEFT4DEAD2: return 50; case SOURCE_ENGINE_ALIENSWARM: diff --git a/loader/loader.cpp b/loader/loader.cpp index ec60b3ba..eb2c8fad 100644 --- a/loader/loader.cpp +++ b/loader/loader.cpp @@ -86,6 +86,7 @@ #define FILENAME_1_6_DOTA "sourcemod.2.dota" PLATFORM_EXT #define FILENAME_1_6_BLADE "sourcemod.2.blade" PLATFORM_EXT #define FILENAME_1_6_INSURGENCY "sourcemod.2.insurgency" PLATFORM_EXT +#define FILENAME_1_6_CONTAGION "sourcemod.2.contagion" PLATFORM_EXT HINSTANCE g_hCore = NULL; bool load_attempted = false; @@ -260,6 +261,11 @@ DLL_EXPORT METAMOD_PLUGIN *CreateInterface_MMS(const MetamodVersionInfo *mvi, co filename = FILENAME_1_6_ND; break; } + case SOURCE_ENGINE_CONTAGION: + { + filename = FILENAME_1_6_CONTAGION; + break; + } case SOURCE_ENGINE_ALIENSWARM: { filename = FILENAME_1_6_SWARM; diff --git a/plugins/include/halflife.inc b/plugins/include/halflife.inc index 92cc6b5c..b0d2b464 100644 --- a/plugins/include/halflife.inc +++ b/plugins/include/halflife.inc @@ -87,6 +87,7 @@ enum EngineVersion Engine_SDK2013, /**< Source SDK 2013 */ Engine_Blade, /**< Blade Symphony */ Engine_Insurgency, /**< Insurgency (2013 Retail version)*/ + Engine_Contagion, /**< Contagion */ }; #define INVALID_ENT_REFERENCE 0xFFFFFFFF