diff --git a/AMBuildScript b/AMBuildScript index fd5ea381..a02779f9 100644 --- a/AMBuildScript +++ b/AMBuildScript @@ -23,20 +23,21 @@ PossibleSDKs = { 'hl2dm': SDK('HL2SDKHL2DM', '2.hl2dm', '7', 'HL2DM', WinLinuxMac, 'hl2dm'), 'dods': SDK('HL2SDKDODS', '2.dods', '8', 'DODS', WinLinuxMac, 'dods'), 'sdk2013': SDK('HL2SDK2013', '2.sdk2013', '9', 'SDK2013', WinLinuxMac, 'sdk2013'), - 'tf2': SDK('HL2SDKTF2', '2.tf2', '10', 'TF2', WinLinuxMac, 'tf2'), - 'l4d': SDK('HL2SDKL4D', '2.l4d', '11', 'LEFT4DEAD', WinLinuxMac, 'l4d'), - 'nucleardawn': SDK('HL2SDKND', '2.nd', '12', 'NUCLEARDAWN', WinLinuxMac, 'nucleardawn'), - 'l4d2': SDK('HL2SDKL4D2', '2.l4d2', '14', 'LEFT4DEAD2', WinLinuxMac, 'l4d2'), + 'tf2': SDK('HL2SDKTF2', '2.tf2', '11', 'TF2', WinLinuxMac, 'tf2'), + 'l4d': SDK('HL2SDKL4D', '2.l4d', '12', 'LEFT4DEAD', WinLinuxMac, 'l4d'), + 'nucleardawn': SDK('HL2SDKND', '2.nd', '13', 'NUCLEARDAWN', WinLinuxMac, 'nucleardawn'), + 'l4d2': SDK('HL2SDKL4D2', '2.l4d2', '15', 'LEFT4DEAD2', WinLinuxMac, 'l4d2'), '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'), 'eye': SDK('HL2SDK-EYE', '2.eye', '5', 'EYE', WinOnly, 'eye'), - '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'), + 'csgo': SDK('HL2SDKCSGO', '2.csgo', '20', 'CSGO', WinLinuxMac, 'csgo'), + 'dota': SDK('HL2SDKDOTA', '2.dota', '21', 'DOTA', WinLinuxMac, 'dota'), + 'portal2': SDK('HL2SDKPORTAL2', '2.portal2', '17', 'PORTAL2', [], 'portal2'), + 'blade': SDK('HL2SDKBLADE', '2.blade', '18', 'BLADE', WinLinux, 'blade'), + 'insurgency': SDK('HL2SDKINSURGENCY', '2.insurgency', '19', 'INSURGENCY', WinLinuxMac, 'insurgency'), + 'contagion': SDK('HL2SDKCONTAGION', '2.contagion', '14', 'CONTAGION', WinOnly, 'contagion'), + 'bms': SDK('HL2SDKBMS', '2.bms', '10', 'BMS', WinLinux, 'bms'), } def ResolveEnvPath(env, folder): @@ -377,7 +378,7 @@ class SMConfig(object): compiler.defines += ['SOURCE_ENGINE=' + sdk.code] - if sdk.name == 'sdk2013' and compiler.like('gcc'): + if sdk.name in ['sdk2013', 'bms'] and compiler.like('gcc'): # The 2013 SDK already has these in public/tier0/basetypes.h compiler.defines.remove('stricmp=strcasecmp') compiler.defines.remove('_stricmp=strcasecmp') @@ -394,7 +395,7 @@ class SMConfig(object): if sdk.name in ['blade', 'insurgency', 'csgo', 'dota']: compiler.defines += ['NETWORK_VARS_ENABLED'] - if sdk.name in ['css', 'hl2dm', 'dods', 'sdk2013', 'tf2', 'l4d', 'nucleardawn', 'l4d2', 'dota']: + if sdk.name in ['css', 'hl2dm', 'dods', 'sdk2013', 'bms', 'tf2', 'l4d', 'nucleardawn', 'l4d2', 'dota']: if builder.target_platform in ['linux', 'mac']: compiler.defines += ['NO_HOOK_MALLOC', 'NO_MALLOC_OVERRIDE'] @@ -407,18 +408,18 @@ class SMConfig(object): if builder.target_platform == 'linux': if sdk.name == 'episode1': lib_folder = os.path.join(sdk.path, 'linux_sdk') - elif sdk.name == 'sdk2013': + elif sdk.name in ['sdk2013', 'bms']: lib_folder = os.path.join(sdk.path, 'lib', 'public', 'linux32') else: lib_folder = os.path.join(sdk.path, 'lib', 'linux') elif builder.target_platform == 'mac': - if sdk.name == 'sdk2013': + if sdk.name in ['sdk2013', 'bms']: lib_folder = os.path.join(sdk.path, 'lib', 'public', 'osx32') else: lib_folder = os.path.join(sdk.path, 'lib', 'mac') if builder.target_platform in ['linux', 'mac']: - if sdk.name == 'sdk2013': + if sdk.name in ['sdk2013', 'bms']: compiler.postlink += [ compiler.Dep(os.path.join(lib_folder, 'tier1.a')), compiler.Dep(os.path.join(lib_folder, 'mathlib.a')) @@ -437,7 +438,7 @@ class SMConfig(object): dynamic_libs = [] if builder.target_platform == 'linux': compiler.linkflags[0:0] = ['-lm'] - if sdk.name in ['css', 'hl2dm', 'dods', 'tf2', 'sdk2013', 'nucleardawn', 'l4d2']: + if sdk.name in ['css', 'hl2dm', 'dods', 'tf2', 'sdk2013', 'bms', 'nucleardawn', 'l4d2']: dynamic_libs = ['libtier0_srv.so', 'libvstdlib_srv.so'] elif sdk.name in ['l4d', 'blade', 'insurgency', 'csgo', 'dota']: dynamic_libs = ['libtier0.so', 'libvstdlib.so'] diff --git a/core/HalfLife2.cpp b/core/HalfLife2.cpp index d52bc6fa..aff756f1 100644 --- a/core/HalfLife2.cpp +++ b/core/HalfLife2.cpp @@ -59,7 +59,8 @@ typedef ICommandLine *(*FakeGetCommandLine)(); #define VSTDLIB_NAME "libvstdlib.dylib" #elif defined __linux__ #if SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_TF2 \ - || SOURCE_ENGINE == SE_SDK2013 || SOURCE_ENGINE == SE_LEFT4DEAD2 || SOURCE_ENGINE == SE_NUCLEARDAWN + || SOURCE_ENGINE == SE_SDK2013 || SOURCE_ENGINE == SE_LEFT4DEAD2 || SOURCE_ENGINE == SE_NUCLEARDAWN \ + || SOURCE_ENGINE == SE_BMS #define TIER0_NAME "libtier0_srv.so" #define VSTDLIB_NAME "libvstdlib_srv.so" #elif SOURCE_ENGINE >= SE_LEFT4DEAD @@ -153,11 +154,12 @@ void CHalfLife2::OnSourceModAllInitialized_Post() void CHalfLife2::InitLogicalEntData() { -#if SOURCE_ENGINE == SE_TF2 \ - || SOURCE_ENGINE == SE_DODS \ - || SOURCE_ENGINE == SE_HL2DM \ - || SOURCE_ENGINE == SE_CSS \ - || SOURCE_ENGINE == SE_SDK2013 +#if SOURCE_ENGINE == SE_TF2 \ + || SOURCE_ENGINE == SE_DODS \ + || SOURCE_ENGINE == SE_HL2DM \ + || SOURCE_ENGINE == SE_CSS \ + || SOURCE_ENGINE == SE_SDK2013 \ + || SOURCE_ENGINE == SE_BMS if (g_SMAPI->GetServerFactory(false)("VSERVERTOOLS003", nullptr)) { diff --git a/core/MenuStyle_Base.cpp b/core/MenuStyle_Base.cpp index cda17be8..415029c1 100644 --- a/core/MenuStyle_Base.cpp +++ b/core/MenuStyle_Base.cpp @@ -338,7 +338,8 @@ void BaseMenuStyle::ClientPressedKey(int client, unsigned int key_press) #endif 0, PITCH_NORM, -#if SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_SDK2013 || SOURCE_ENGINE == SE_TF2 +#if SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS \ + || SOURCE_ENGINE == SE_SDK2013 || SOURCE_ENGINE == SE_BMS || SOURCE_ENGINE == SE_TF2 0, #endif &pos); diff --git a/core/logic_bridge.cpp b/core/logic_bridge.cpp index 8fc82e53..bec62764 100644 --- a/core/logic_bridge.cpp +++ b/core/logic_bridge.cpp @@ -373,6 +373,8 @@ static const char *get_source_engine_name() return "dods"; #elif SOURCE_ENGINE == SE_SDK2013 return "sdk2013"; +#elif SOURCE_ENGINE == SE_BMS + return "bms"; #elif SOURCE_ENGINE == SE_TF2 return "tf2"; #elif SOURCE_ENGINE == SE_LEFT4DEAD @@ -404,6 +406,7 @@ static bool symbols_are_hidden() || (SOURCE_ENGINE == SE_HL2DM) \ || (SOURCE_ENGINE == SE_DODS) \ || (SOURCE_ENGINE == SE_SDK2013) \ + || (SOURCE_ENGINE == SE_BMS) \ || (SOURCE_ENGINE == SE_TF2) \ || (SOURCE_ENGINE == SE_LEFT4DEAD) \ || (SOURCE_ENGINE == SE_NUCLEARDAWN) \ @@ -540,6 +543,8 @@ void do_global_plugin_loads() #define GAMEFIX "2.dods" #elif SOURCE_ENGINE == SE_SDK2013 #define GAMEFIX "2.sdk2013" +#elif SOURCE_ENGINE == SE_BMS +#define GAMEFIX "2.bms" #elif SOURCE_ENGINE == SE_TF2 #define GAMEFIX "2.tf2" #elif SOURCE_ENGINE == SE_DARKMESSIAH diff --git a/core/smn_entities.cpp b/core/smn_entities.cpp index d7d99b4b..37a9848c 100644 --- a/core/smn_entities.cpp +++ b/core/smn_entities.cpp @@ -1254,7 +1254,8 @@ static cell_t GetEntProp(IPluginContext *pContext, const cell_t *params) is_unsigned = ((pProp->GetFlags() & SPROP_UNSIGNED) == SPROP_UNSIGNED); // This isn't in CS:S yet, but will be, doesn't hurt to add now, and will save us a build later -#if SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_SDK2013 || SOURCE_ENGINE == SE_TF2 +#if SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS \ + || SOURCE_ENGINE == SE_BMS || SOURCE_ENGINE == SE_SDK2013 || SOURCE_ENGINE == SE_TF2 if (pProp->GetFlags() & SPROP_VARINT) { bit_count = sizeof(int) * 8; @@ -1352,7 +1353,8 @@ static cell_t SetEntProp(IPluginContext *pContext, const cell_t *params) FIND_PROP_SEND(DPT_Int, "integer"); // This isn't in CS:S yet, but will be, doesn't hurt to add now, and will save us a build later -#if SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_SDK2013 || SOURCE_ENGINE == SE_TF2 +#if SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS \ + || SOURCE_ENGINE == SE_BMS || SOURCE_ENGINE == SE_SDK2013 || SOURCE_ENGINE == SE_TF2 if (pProp->GetFlags() & SPROP_VARINT) { bit_count = sizeof(int) * 8; @@ -2156,7 +2158,8 @@ static int32_t SDKEntFlagToSMEntFlag(int flag) #if SOURCE_ENGINE == SE_ALIENSWARM case FL_FREEZING: return ENTFLAG_FREEZING; -#elif SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_SDK2013 || SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_TF2 +#elif SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_SDK2013 \ + || SOURCE_ENGINE == SE_BMS || SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_TF2 case FL_EP2V_UNKNOWN: return ENTFLAG_EP2V_UNKNOWN1; #endif @@ -2234,7 +2237,8 @@ static int32_t SMEntFlagToSDKEntFlag(int32_t flag) #if SOURCE_ENGINE == SE_ALIENSWARM case ENTFLAG_FREEZING: return FL_FREEZING; -#elif SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_SDK2013 || SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_TF2 +#elif SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_SDK2013 \ + || SOURCE_ENGINE == SE_BMS || SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_TF2 case ENTFLAG_EP2V_UNKNOWN1: return FL_EP2V_UNKNOWN; #endif diff --git a/core/smn_halflife.cpp b/core/smn_halflife.cpp index d8e02507..b9de4e6a 100644 --- a/core/smn_halflife.cpp +++ b/core/smn_halflife.cpp @@ -498,6 +498,7 @@ static cell_t GuessSDKVersion(IPluginContext *pContext, const cell_t *params) case SOURCE_ENGINE_HL2DM: case SOURCE_ENGINE_DODS: case SOURCE_ENGINE_TF2: + case SOURCE_ENGINE_BMS: case SOURCE_ENGINE_SDK2013: return 35; case SOURCE_ENGINE_LEFT4DEAD: diff --git a/extensions/sdkhooks/extension.cpp b/extensions/sdkhooks/extension.cpp index 82d977b1..d0a0261d 100644 --- a/extensions/sdkhooks/extension.cpp +++ b/extensions/sdkhooks/extension.cpp @@ -184,7 +184,8 @@ SH_DECL_MANUALHOOK0_void(Spawn, 0, 0, 0); SH_DECL_MANUALHOOK1_void(StartTouch, 0, 0, 0, CBaseEntity *); SH_DECL_MANUALHOOK0_void(Think, 0, 0, 0); SH_DECL_MANUALHOOK1_void(Touch, 0, 0, 0, CBaseEntity *); -#if SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_TF2 || SOURCE_ENGINE == SE_SDK2013 +#if SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_TF2 \ + || SOURCE_ENGINE == SE_BMS || SOURCE_ENGINE == SE_SDK2013 SH_DECL_MANUALHOOK4_void(TraceAttack, 0, 0, 0, CTakeDamageInfoHack &, const Vector &, CGameTrace *, CDmgAccumulator *); #else SH_DECL_MANUALHOOK3_void(TraceAttack, 0, 0, 0, CTakeDamageInfoHack &, const Vector &, CGameTrace *); @@ -1391,7 +1392,8 @@ void SDKHooks::Hook_TouchPost(CBaseEntity *pOther) RETURN_META(MRES_IGNORED); } -#if SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_TF2 || SOURCE_ENGINE == SE_SDK2013 +#if SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_TF2 \ + || SOURCE_ENGINE == SE_BMS || SOURCE_ENGINE == SE_SDK2013 void SDKHooks::Hook_TraceAttack(CTakeDamageInfoHack &info, const Vector &vecDir, trace_t *ptr, CDmgAccumulator *pAccumulator) #else void SDKHooks::Hook_TraceAttack(CTakeDamageInfoHack &info, const Vector &vecDir, trace_t *ptr) @@ -1471,7 +1473,8 @@ void SDKHooks::Hook_TraceAttack(CTakeDamageInfoHack &info, const Vector &vecDir, RETURN_META(MRES_IGNORED); } -#if SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_TF2 || SOURCE_ENGINE == SE_SDK2013 +#if SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_TF2 \ + || SOURCE_ENGINE == SE_BMS || SOURCE_ENGINE == SE_SDK2013 void SDKHooks::Hook_TraceAttackPost(CTakeDamageInfoHack &info, const Vector &vecDir, trace_t *ptr, CDmgAccumulator *pAccumulator) #else void SDKHooks::Hook_TraceAttackPost(CTakeDamageInfoHack &info, const Vector &vecDir, trace_t *ptr) diff --git a/extensions/sdkhooks/extension.h b/extensions/sdkhooks/extension.h index 7beb86ab..62745ae9 100644 --- a/extensions/sdkhooks/extension.h +++ b/extensions/sdkhooks/extension.h @@ -313,7 +313,8 @@ public: void Hook_ThinkPost(); void Hook_Touch(CBaseEntity *pOther); void Hook_TouchPost(CBaseEntity *pOther); -#if SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_TF2 || SOURCE_ENGINE == SE_SDK2013 +#if SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_TF2 \ + || SOURCE_ENGINE == SE_BMS || SOURCE_ENGINE == SE_SDK2013 void Hook_TraceAttack(CTakeDamageInfoHack &info, const Vector &vecDir, trace_t *ptr, CDmgAccumulator *pAccumulator); void Hook_TraceAttackPost(CTakeDamageInfoHack &info, const Vector &vecDir, trace_t *ptr, CDmgAccumulator *pAccumulator); #else diff --git a/extensions/sdkhooks/takedamageinfohack.cpp b/extensions/sdkhooks/takedamageinfohack.cpp index 5e5a6300..ef71b46f 100644 --- a/extensions/sdkhooks/takedamageinfohack.cpp +++ b/extensions/sdkhooks/takedamageinfohack.cpp @@ -68,7 +68,8 @@ CTakeDamageInfoHack::CTakeDamageInfoHack( CBaseEntity *pInflictor, CBaseEntity * m_iDamageCustom = 0; #endif -#if SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_SDK2013 || SOURCE_ENGINE == SE_TF2 +#if SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_SDK2013 \ + || SOURCE_ENGINE == SE_BMS || SOURCE_ENGINE == SE_TF2 m_iDamagedOtherPlayers = 0; m_iPlayerPenetrationCount = 0; m_flDamageBonus = 0.0f; diff --git a/extensions/sdktools/tempents.cpp b/extensions/sdktools/tempents.cpp index 2a41b7b0..25eabb11 100644 --- a/extensions/sdktools/tempents.cpp +++ b/extensions/sdktools/tempents.cpp @@ -285,11 +285,12 @@ void TempEntityManager::Initialize() int offset; m_Loaded = false; -#if SOURCE_ENGINE == SE_TF2 \ - || SOURCE_ENGINE == SE_DODS \ - || SOURCE_ENGINE == SE_HL2DM \ - || SOURCE_ENGINE == SE_CSS \ - || SOURCE_ENGINE == SE_SDK2013 +#if SOURCE_ENGINE == SE_TF2 \ + || SOURCE_ENGINE == SE_DODS \ + || SOURCE_ENGINE == SE_HL2DM \ + || SOURCE_ENGINE == SE_CSS \ + || SOURCE_ENGINE == SE_SDK2013 \ + || SOURCE_ENGINE == SE_BMS if (g_SMAPI->GetServerFactory(false)("VSERVERTOOLS003", nullptr)) { diff --git a/extensions/sdktools/vcaller.cpp b/extensions/sdktools/vcaller.cpp index ebcfe186..45d8e4bd 100644 --- a/extensions/sdktools/vcaller.cpp +++ b/extensions/sdktools/vcaller.cpp @@ -133,6 +133,7 @@ static cell_t PrepSDKCall_SetSignature(IPluginContext *pContext, const cell_t *p || SOURCE_ENGINE == SE_HL2DM \ || SOURCE_ENGINE == SE_DODS \ || SOURCE_ENGINE == SE_SDK2013 \ + || SOURCE_ENGINE == SE_BMS \ || SOURCE_ENGINE == SE_TF2 \ || SOURCE_ENGINE == SE_LEFT4DEAD \ || SOURCE_ENGINE == SE_LEFT4DEAD2 \ diff --git a/extensions/sdktools/vglobals.cpp b/extensions/sdktools/vglobals.cpp index 76b5609d..ded75ef4 100644 --- a/extensions/sdktools/vglobals.cpp +++ b/extensions/sdktools/vglobals.cpp @@ -211,11 +211,12 @@ bool UTIL_VerifySignature(const void *addr, const char *sig, size_t len) void GetIServer() { -#if SOURCE_ENGINE == SE_TF2 \ - || SOURCE_ENGINE == SE_DODS \ - || SOURCE_ENGINE == SE_HL2DM \ - || SOURCE_ENGINE == SE_CSS \ +#if SOURCE_ENGINE == SE_TF2 \ + || SOURCE_ENGINE == SE_DODS \ + || SOURCE_ENGINE == SE_HL2DM \ + || SOURCE_ENGINE == SE_CSS \ || SOURCE_ENGINE == SE_SDK2013 \ + || SOURCE_ENGINE == SE_BMS \ || SOURCE_ENGINE == SE_INSURGENCY #if SOURCE_ENGINE != SE_INSURGENCY diff --git a/extensions/sdktools/vhelpers.cpp b/extensions/sdktools/vhelpers.cpp index 9207dcba..a34c5ccb 100644 --- a/extensions/sdktools/vhelpers.cpp +++ b/extensions/sdktools/vhelpers.cpp @@ -458,11 +458,12 @@ void UTIL_DrawSendTable(FILE *fp, SendTable *pTable, int level = 1) pProp = pTable->GetProp(i); if (pProp->GetDataTable()) { - fprintf(fp, "%*sTable: %s (offset %d) (type %s)\n", + fprintf(fp, "%*sTable: %s (offset %d) (type %s) (unk %d 0x%p)\n", level, "", pProp->GetName(), pProp->GetOffset(), - pProp->GetDataTable()->GetName()); + pProp->GetDataTable()->GetName(), + pProp->m_Unknown1, pProp->m_Unknown1); UTIL_DrawSendTable(fp, pProp->GetDataTable(), level + 1); } @@ -473,24 +474,26 @@ void UTIL_DrawSendTable(FILE *fp, SendTable *pTable, int level = 1) if (type != NULL) { fprintf(fp, - "%*sMember: %s (offset %d) (type %s) (bits %d) (%s)\n", + "%*sMember: %s (offset %d) (type %s) (bits %d) (%s) (unk %d 0x%p)\n", level, "", pProp->GetName(), pProp->GetOffset(), type, pProp->m_nBits, - UTIL_SendFlagsToString(pProp->GetFlags(), pProp->GetType())); + UTIL_SendFlagsToString(pProp->GetFlags(), pProp->GetType()), + pProp->m_Unknown1, pProp->m_Unknown1); } else { fprintf(fp, - "%*sMember: %s (offset %d) (type %d) (bits %d) (%s)\n", + "%*sMember: %s (offset %d) (type %d) (bits %d) (%s) (unk %d 0x%p)\n", level, "", pProp->GetName(), pProp->GetOffset(), pProp->GetType(), pProp->m_nBits, - UTIL_SendFlagsToString(pProp->GetFlags(), pProp->GetType())); + UTIL_SendFlagsToString(pProp->GetFlags(), pProp->GetType()), + pProp->m_Unknown1, pProp->m_Unknown1); } } } @@ -597,11 +600,12 @@ CEntityFactoryDictionary *GetEntityFactoryDictionary() { static CEntityFactoryDictionary *dict = NULL; -#if SOURCE_ENGINE == SE_TF2 \ - || SOURCE_ENGINE == SE_CSS \ - || SOURCE_ENGINE == SE_DODS \ - || SOURCE_ENGINE == SE_HL2DM \ +#if SOURCE_ENGINE == SE_TF2 \ + || SOURCE_ENGINE == SE_CSS \ + || SOURCE_ENGINE == SE_DODS \ + || SOURCE_ENGINE == SE_HL2DM \ || SOURCE_ENGINE == SE_SDK2013 \ + || SOURCE_ENGINE == SE_BMS \ || SOURCE_ENGINE == SE_NUCLEARDAWN dict = (CEntityFactoryDictionary *) servertools->GetEntityFactoryDictionary(); #else diff --git a/extensions/sdktools/vnatives.cpp b/extensions/sdktools/vnatives.cpp index ff1ebe60..fab25181 100644 --- a/extensions/sdktools/vnatives.cpp +++ b/extensions/sdktools/vnatives.cpp @@ -598,7 +598,8 @@ static cell_t SlapPlayer(IPluginContext *pContext, const cell_t *params) CellRecipientFilter rf; rf.SetToReliable(true); rf.Initialize(player_list, total_players); -#if SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_SDK2013 || SOURCE_ENGINE == SE_TF2 +#if SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_SDK2013 \ + || SOURCE_ENGINE == SE_BMS || SOURCE_ENGINE == SE_TF2 engsound->EmitSound(rf, params[1], CHAN_AUTO, sound_name, VOL_NORM, ATTN_NORM, 0, PITCH_NORM, 0, &pos); #elif SOURCE_ENGINE < SE_PORTAL2 engsound->EmitSound(rf, params[1], CHAN_AUTO, sound_name, VOL_NORM, ATTN_NORM, 0, PITCH_NORM, &pos); @@ -797,6 +798,7 @@ static cell_t FindEntityByClassname(IPluginContext *pContext, const cell_t *para || SOURCE_ENGINE == SE_DODS \ || SOURCE_ENGINE == SE_HL2DM \ || SOURCE_ENGINE == SE_CSS \ + || SOURCE_ENGINE == SE_BMS \ || SOURCE_ENGINE == SE_SDK2013 static bool bHasServerTools3 = !!g_SMAPI->GetServerFactory(false)("VSERVERTOOLS003", nullptr); diff --git a/extensions/sdktools/vsound.cpp b/extensions/sdktools/vsound.cpp index cbf2da5c..cfd4ec6a 100644 --- a/extensions/sdktools/vsound.cpp +++ b/extensions/sdktools/vsound.cpp @@ -41,7 +41,8 @@ SH_DECL_HOOK8_void(IVEngineServer, EmitAmbientSound, SH_NOATTRIB, 0, int, const #if SOURCE_ENGINE >= SE_PORTAL2 SH_DECL_HOOK17(IEngineSound, EmitSound, SH_NOATTRIB, 0, int, IRecipientFilter &, int, int, const char *, unsigned int, const char *, float, float, int, int, int, const Vector *, const Vector *, CUtlVector *, bool, float, int); SH_DECL_HOOK17(IEngineSound, EmitSound, SH_NOATTRIB, 1, int, IRecipientFilter &, int, int, const char *, unsigned int, const char *, float, soundlevel_t, int, int, int, const Vector *, const Vector *, CUtlVector *, bool, float, int); -#elif SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_SDK2013 || SOURCE_ENGINE == SE_TF2 +#elif SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_SDK2013 \ + || SOURCE_ENGINE == SE_BMS || SOURCE_ENGINE == SE_TF2 SH_DECL_HOOK15_void(IEngineSound, EmitSound, SH_NOATTRIB, 0, IRecipientFilter &, int, int, const char *, float, float, int, int, int, const Vector *, const Vector *, CUtlVector *, bool, float, int); SH_DECL_HOOK15_void(IEngineSound, EmitSound, SH_NOATTRIB, 1, IRecipientFilter &, int, int, const char *, float, soundlevel_t, int, int, int, const Vector *, const Vector *, CUtlVector *, bool, float, int); #else @@ -339,7 +340,8 @@ int SoundHooks::OnEmitSound(IRecipientFilter &filter, int iEntIndex, int iChanne float flVolume, soundlevel_t iSoundlevel, int nSeed, int iFlags, int iPitch, const Vector *pOrigin, const Vector *pDirection, CUtlVector *pUtlVecOrigins, bool bUpdatePositions, float soundtime, int speakerentity) -#elif SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_SDK2013 || SOURCE_ENGINE == SE_TF2 +#elif SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_SDK2013 \ + || SOURCE_ENGINE == SE_BMS || SOURCE_ENGINE == SE_TF2 void SoundHooks::OnEmitSound(IRecipientFilter &filter, int iEntIndex, int iChannel, const char *pSample, float flVolume, soundlevel_t iSoundlevel, int iFlags, int iPitch, int iSpecialDSP, const Vector *pOrigin, const Vector *pDirection, CUtlVector *pUtlVecOrigins, bool bUpdatePositions, @@ -443,7 +445,8 @@ void SoundHooks::OnEmitSound(IRecipientFilter &filter, int iEntIndex, int iChann (crf, iEntIndex, iChannel, soundEntry, nSoundEntryHash, buffer, flVolume, iSoundlevel, nSeed, iFlags, iPitch, pOrigin, pDirection, pUtlVecOrigins, bUpdatePositions, soundtime, speakerentity) ); -#elif SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_SDK2013 || SOURCE_ENGINE == SE_TF2 +#elif SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_SDK2013 \ + || SOURCE_ENGINE == SE_BMS || SOURCE_ENGINE == SE_TF2 RETURN_META_NEWPARAMS( MRES_IGNORED, static_cast *pUtlVecOrigins, bool bUpdatePositions, float soundtime, int speakerentity) -#elif SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_SDK2013 || SOURCE_ENGINE == SE_TF2 +#elif SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_SDK2013 \ + || SOURCE_ENGINE == SE_BMS || SOURCE_ENGINE == SE_TF2 void SoundHooks::OnEmitSound2(IRecipientFilter &filter, int iEntIndex, int iChannel, const char *pSample, float flVolume, float flAttenuation, int iFlags, int iPitch, int iSpecialDSP, const Vector *pOrigin, const Vector *pDirection, CUtlVector *pUtlVecOrigins, bool bUpdatePositions, @@ -579,7 +583,8 @@ void SoundHooks::OnEmitSound2(IRecipientFilter &filter, int iEntIndex, int iChan (crf, iEntIndex, iChannel, soundEntry, nSoundEntryHash, buffer, flVolume, SNDLVL_TO_ATTN(static_cast(sndlevel)), nSeed, iFlags, iPitch, pOrigin, pDirection, pUtlVecOrigins, bUpdatePositions, soundtime, speakerentity) ); -#elif SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_SDK2013 || SOURCE_ENGINE == SE_TF2 +#elif SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_SDK2013 \ + || SOURCE_ENGINE == SE_BMS || SOURCE_ENGINE == SE_TF2 RETURN_META_NEWPARAMS( MRES_IGNORED, static_cast *pUtlVecOrigins, bool bUpdatePositions, float soundtime, int speakerentity); #else -#if SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_SDK2013 || SOURCE_ENGINE == SE_TF2 +#if SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_SDK2013 \ + || SOURCE_ENGINE == SE_BMS || SOURCE_ENGINE == SE_TF2 void OnEmitSound(IRecipientFilter& filter, int iEntIndex, int iChannel, const char *pSample, float flVolume, soundlevel_t iSoundlevel, int iFlags, int iPitch, int iSpecialDSP, const Vector *pOrigin, @@ -86,7 +87,7 @@ public: float flAttenuation, int iFlags, int iPitch, const Vector *pOrigin, const Vector *pDirection, CUtlVector *pUtlVecOrigins, bool bUpdatePositions, float soundtime, int speakerentity); -#endif // SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_SDK2013 || SOURCE_ENGINE == SE_TF2 +#endif // SOURCE_ENGINE == SE_CSS, SE_HL2DM, SE_DODS, SE_SDK2013, SE_BMS, SE_TF2 #endif // SOURCE_ENGINE >= SE_PORTAL2 private: size_t _FillInPlayers(int *pl_array, IRecipientFilter *pFilter); diff --git a/loader/loader.cpp b/loader/loader.cpp index eb2c8fad..66531929 100644 --- a/loader/loader.cpp +++ b/loader/loader.cpp @@ -87,6 +87,7 @@ #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 +#define FILENAME_1_6_BMS "sourcemod.2.bms" PLATFORM_EXT HINSTANCE g_hCore = NULL; bool load_attempted = false; @@ -311,6 +312,11 @@ DLL_EXPORT METAMOD_PLUGIN *CreateInterface_MMS(const MetamodVersionInfo *mvi, co filename = FILENAME_1_6_SDK2013; break; } + case SOURCE_ENGINE_BMS: + { + filename = FILENAME_1_6_BMS; + break; + } case SOURCE_ENGINE_TF2: { filename = FILENAME_1_6_TF2; diff --git a/plugins/include/halflife.inc b/plugins/include/halflife.inc index 4514bb08..5454eb7f 100644 --- a/plugins/include/halflife.inc +++ b/plugins/include/halflife.inc @@ -88,6 +88,7 @@ enum EngineVersion Engine_Blade, /**< Blade Symphony */ Engine_Insurgency, /**< Insurgency (2013 Retail version)*/ Engine_Contagion, /**< Contagion */ + Engine_BlackMesa, /**< Black Mesa Multiplayer */ }; #define INVALID_ENT_REFERENCE 0xFFFFFFFF diff --git a/tools/checkout-deps.sh b/tools/checkout-deps.sh index 40461e0c..c0c9e5bb 100755 --- a/tools/checkout-deps.sh +++ b/tools/checkout-deps.sh @@ -79,7 +79,7 @@ sdks=( csgo hl2dm nucleardawn l4d2 dods l4d css tf2 insurgency sdk2013 dota ) if [ $ismac -eq 0 ]; then # Add these SDKs for Windows or Linux - sdks+=( orangebox blade episode1 ) + sdks+=( orangebox blade episode1 bms ) # Add more SDKs for Windows only if [ $iswin -eq 1 ]; then