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

Merge pull request #14 from alliedmodders/bms-support

Update MM:S to support Black Mesa.
This commit is contained in:
Nicholas Hastings 2015-05-08 06:43:21 -04:00
commit 93f91774a8
7 changed files with 25 additions and 12 deletions

View File

@ -23,20 +23,21 @@ PossibleSDKs = {
'hl2dm': SDK('HL2SDKHL2DM', '2.hl2dm', '7', 'HL2DM', WinLinuxMac, 'hl2dm'), 'hl2dm': SDK('HL2SDKHL2DM', '2.hl2dm', '7', 'HL2DM', WinLinuxMac, 'hl2dm'),
'dods': SDK('HL2SDKDODS', '2.dods', '8', 'DODS', WinLinuxMac, 'dods'), 'dods': SDK('HL2SDKDODS', '2.dods', '8', 'DODS', WinLinuxMac, 'dods'),
'sdk2013': SDK('HL2SDK2013', '2.sdk2013', '9', 'SDK2013', WinLinuxMac, 'sdk2013'), 'sdk2013': SDK('HL2SDK2013', '2.sdk2013', '9', 'SDK2013', WinLinuxMac, 'sdk2013'),
'tf2': SDK('HL2SDKTF2', '2.tf2', '10', 'TF2', WinLinuxMac, 'tf2'), 'tf2': SDK('HL2SDKTF2', '2.tf2', '11', 'TF2', WinLinuxMac, 'tf2'),
'l4d': SDK('HL2SDKL4D', '2.l4d', '11', 'LEFT4DEAD', WinLinuxMac, 'l4d'), 'l4d': SDK('HL2SDKL4D', '2.l4d', '12', 'LEFT4DEAD', WinLinuxMac, 'l4d'),
'nucleardawn': SDK('HL2SDKND', '2.nd', '12', 'NUCLEARDAWN', WinLinuxMac, 'nucleardawn'), 'nucleardawn': SDK('HL2SDKND', '2.nd', '13', 'NUCLEARDAWN', WinLinuxMac, 'nucleardawn'),
'l4d2': SDK('HL2SDKL4D2', '2.l4d2', '14', 'LEFT4DEAD2', WinLinuxMac, 'l4d2'), 'l4d2': SDK('HL2SDKL4D2', '2.l4d2', '15', 'LEFT4DEAD2', WinLinuxMac, 'l4d2'),
'darkm': SDK('HL2SDK-DARKM', '2.darkm', '2', 'DARKMESSIAH', WinOnly, 'darkm'), 'darkm': SDK('HL2SDK-DARKM', '2.darkm', '2', 'DARKMESSIAH', WinOnly, 'darkm'),
'swarm': SDK('HL2SDK-SWARM', '2.swarm', '15', 'ALIENSWARM', WinOnly, 'swarm'), 'swarm': SDK('HL2SDK-SWARM', '2.swarm', '16', 'ALIENSWARM', WinOnly, 'swarm'),
'bgt': SDK('HL2SDK-BGT', '2.bgt', '4', 'BLOODYGOODTIME', WinOnly, 'bgt'), 'bgt': SDK('HL2SDK-BGT', '2.bgt', '4', 'BLOODYGOODTIME', WinOnly, 'bgt'),
'eye': SDK('HL2SDK-EYE', '2.eye', '5', 'EYE', WinOnly, 'eye'), 'eye': SDK('HL2SDK-EYE', '2.eye', '5', 'EYE', WinOnly, 'eye'),
'csgo': SDK('HL2SDKCSGO', '2.csgo', '19', 'CSGO', WinLinuxMac, 'csgo'), 'csgo': SDK('HL2SDKCSGO', '2.csgo', '20', 'CSGO', WinLinuxMac, 'csgo'),
'dota': SDK('HL2SDKDOTA', '2.dota', '20', 'DOTA', WinLinuxMac, 'dota'), 'dota': SDK('HL2SDKDOTA', '2.dota', '21', 'DOTA', WinLinuxMac, 'dota'),
'portal2': SDK('HL2SDKPORTAL2', '2.portal2', '16', 'PORTAL2', [], 'portal2'), 'portal2': SDK('HL2SDKPORTAL2', '2.portal2', '17', 'PORTAL2', [], 'portal2'),
'blade': SDK('HL2SDKBLADE', '2.blade', '17', 'BLADE', WinLinux, 'blade'), 'blade': SDK('HL2SDKBLADE', '2.blade', '18', 'BLADE', WinLinux, 'blade'),
'insurgency': SDK('HL2SDKINSURGENCY', '2.insurgency', '18', 'INSURGENCY', WinLinuxMac, 'insurgency'), 'insurgency': SDK('HL2SDKINSURGENCY', '2.insurgency', '19', 'INSURGENCY', WinLinuxMac, 'insurgency'),
'contagion': SDK('HL2SDKCONTAGION', '2.contagion', '13', 'CONTAGION', WinOnly, 'contagion'), 'contagion': SDK('HL2SDKCONTAGION', '2.contagion', '14', 'CONTAGION', WinOnly, 'contagion'),
'bms': SDK('HL2SDKBMS', '2.bms', '10', 'BMS', WinLinux, 'bms'),
} }
def ResolveEnvPath(env, folder): def ResolveEnvPath(env, folder):

View File

@ -58,6 +58,7 @@
#define SOURCE_ENGINE_BLADE 20 /**< Blade Symphony */ #define SOURCE_ENGINE_BLADE 20 /**< Blade Symphony */
#define SOURCE_ENGINE_INSURGENCY 21 /**< Insurgency */ #define SOURCE_ENGINE_INSURGENCY 21 /**< Insurgency */
#define SOURCE_ENGINE_CONTAGION 22 /**< Contagion */ #define SOURCE_ENGINE_CONTAGION 22 /**< Contagion */
#define SOURCE_ENGINE_BMS 23 /**< Black Mesa Multiplayer */
#define METAMOD_PLAPI_VERSION 15 /**< Version of this header file */ #define METAMOD_PLAPI_VERSION 15 /**< Version of this header file */
#define METAMOD_PLAPI_NAME "ISmmPlugin" /**< Name of the plugin interface */ #define METAMOD_PLAPI_NAME "ISmmPlugin" /**< Name of the plugin interface */

View File

@ -136,6 +136,8 @@ bool Command_Meta(IMetamodSourceCommandInfo *info)
CONMSG(" Engine: Day of Defeat: Source (Valve Orange Box)\n"); CONMSG(" Engine: Day of Defeat: Source (Valve Orange Box)\n");
#elif SOURCE_ENGINE == SE_SDK2013 #elif SOURCE_ENGINE == SE_SDK2013
CONMSG(" Engine: Source SDK 2013 (2013)\n"); CONMSG(" Engine: Source SDK 2013 (2013)\n");
#elif SOURCE_ENGINE == SE_BMS
CONMSG(" Engine: Black Mesa (2015)\n");
#elif SOURCE_ENGINE == SE_TF2 #elif SOURCE_ENGINE == SE_TF2
CONMSG(" Engine: Team Fortress 2 (Valve Orange Box)\n"); CONMSG(" Engine: Team Fortress 2 (Valve Orange Box)\n");
#elif SOURCE_ENGINE == SE_DARKMESSIAH #elif SOURCE_ENGINE == SE_DARKMESSIAH

View File

@ -414,6 +414,8 @@ int BaseProvider::DetermineSourceEngine()
return SOURCE_ENGINE_CSGO; return SOURCE_ENGINE_CSGO;
#elif SOURCE_ENGINE == SE_DOTA #elif SOURCE_ENGINE == SE_DOTA
return SOURCE_ENGINE_DOTA; return SOURCE_ENGINE_DOTA;
#elif SOURCE_ENGINE == SE_BMS
return SOURCE_ENGINE_BMS;
#else #else
#error "SOURCE_ENGINE not defined to a known value" #error "SOURCE_ENGINE not defined to a known value"
#endif #endif

View File

@ -89,6 +89,7 @@ static const char *backend_names[] =
"2.blade", "2.blade",
"2.insurgency", "2.insurgency",
"2.contagion", "2.contagion",
"2.bms",
}; };
#if defined _WIN32 #if defined _WIN32
@ -379,6 +380,11 @@ mm_DetermineBackend(QueryValveInterface engineFactory, QueryValveInterface serve
{ {
return MMBackend_HL2DM; return MMBackend_HL2DM;
} }
else if (strcmp(game_name, "bms") == 0
|| (addr = mm_FindPattern(lib, "DT_BlackMesaPlayer", sizeof("DT_BlackMesaPlayer") - 1)))
{
return MMBackend_BMS;
}
else else
{ {
return MMBackend_SDK2013; return MMBackend_SDK2013;

View File

@ -101,6 +101,7 @@ enum MetamodBackend
MMBackend_Blade, MMBackend_Blade,
MMBackend_Insurgency, MMBackend_Insurgency,
MMBackend_Contagion, MMBackend_Contagion,
MMBackend_BMS,
MMBackend_UNKNOWN MMBackend_UNKNOWN
}; };

View File

@ -44,7 +44,7 @@ sdks=( csgo hl2dm nucleardawn l4d2 dods l4d css tf2 insurgency sdk2013 dota )
if [ $ismac -eq 0 ]; then if [ $ismac -eq 0 ]; then
# Add these SDKs for Windows or Linux # Add these SDKs for Windows or Linux
sdks+=( orangebox blade episode1 ) sdks+=( orangebox blade episode1 bms )
# Add more SDKs for Windows only # Add more SDKs for Windows only
if [ $iswin -eq 1 ]; then if [ $iswin -eq 1 ]; then