From c5a81d7c6f43e7965435fa02af8a6ad1462f5d50 Mon Sep 17 00:00:00 2001 From: Nicholas Hastings Date: Tue, 22 Dec 2015 09:53:05 -0500 Subject: [PATCH] Adjust for hl2sdk-bms updates. --- core/HalfLife2.cpp | 8 ++++---- core/sourcemm_api.cpp | 2 +- extensions/sdktools/trnatives.cpp | 2 +- public/smsdk_ext.cpp | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/core/HalfLife2.cpp b/core/HalfLife2.cpp index 405360ee..5e6555bf 100644 --- a/core/HalfLife2.cpp +++ b/core/HalfLife2.cpp @@ -1233,7 +1233,7 @@ SMFindMapResult CHalfLife2::FindMap(const char *pMapName, char *pFoundMap, size_ return SMFindMapResult::FuzzyMatch; } -#elif SOURCE_ENGINE == SE_TF2 +#elif SOURCE_ENGINE == SE_TF2 || SOURCE_ENGINE == SE_BMS static char szTemp[PLATFORM_MAX_PATH]; if (pFoundMap == NULL) { @@ -1272,12 +1272,12 @@ bool CHalfLife2::GetMapDisplayName(const char *pMapName, char *pDisplayname, siz ke::SafeStrcpy(pDisplayname, nMapNameMax, &lastSlashPos[1]); return true; } -#elif SOURCE_ENGINE == SE_TF2 +#elif SOURCE_ENGINE == SE_TF2 || SOURCE_ENGINE == SE_BMS char *ugcPos; - // In TF2, workshop maps show up as workshop/mapname.ugc123456789 regardless of OS + // In TF2 and BMS, workshop maps show up as workshop/mapname.ugc123456789 regardless of OS if (strncmp(pDisplayname, "workshop/", 9) == 0 && (ugcPos = strstr(pDisplayname, ".ugc")) != NULL) { - // Overwrite the . with a nul and SafeStrcpy will handle the rest + // Overwrite the . with a null and SafeStrcpy will handle the rest ugcPos[0] = '\0'; ke::SafeStrcpy(pDisplayname, nMapNameMax, &pDisplayname[9]); return true; diff --git a/core/sourcemm_api.cpp b/core/sourcemm_api.cpp index 25ffe66f..69945330 100644 --- a/core/sourcemm_api.cpp +++ b/core/sourcemm_api.cpp @@ -77,7 +77,7 @@ bool SourceMod_Core::Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlen PLUGIN_SAVEVARS(); GET_V_IFACE_ANY(GetServerFactory, gamedll, IServerGameDLL, INTERFACEVERSION_SERVERGAMEDLL); -#if SOURCE_ENGINE == SE_TF2 || SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_SDK2013 +#if SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_SDK2013 // Shim to avoid hooking shims engine = (IVEngineServer *)ismm->GetEngineFactory()("VEngineServer023", nullptr); if (!engine) diff --git a/extensions/sdktools/trnatives.cpp b/extensions/sdktools/trnatives.cpp index 8b212ac2..9c4b1094 100644 --- a/extensions/sdktools/trnatives.cpp +++ b/extensions/sdktools/trnatives.cpp @@ -530,7 +530,7 @@ static cell_t smn_TRGetPointContents(IPluginContext *pContext, const cell_t *par { mask = enginetrace->GetPointContents(pos); } else { -#if SOURCE_ENGINE >= SE_LEFT4DEAD +#if SOURCE_ENGINE >= SE_LEFT4DEAD || SOURCE_ENGINE == SE_BMS mask = enginetrace->GetPointContents(pos, MASK_ALL, &hentity); #else mask = enginetrace->GetPointContents(pos, &hentity); diff --git a/public/smsdk_ext.cpp b/public/smsdk_ext.cpp index 7a3cd2f8..15040ab7 100644 --- a/public/smsdk_ext.cpp +++ b/public/smsdk_ext.cpp @@ -340,7 +340,7 @@ bool SDKExtension::Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlen, GET_V_IFACE_CURRENT(engineFactory, engine, IVEngineServer, INTERFACEVERSION_VENGINESERVER); #else GET_V_IFACE_ANY(GetServerFactory, gamedll, IServerGameDLL, INTERFACEVERSION_SERVERGAMEDLL); -#if SOURCE_ENGINE == SE_TF2 || SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_SDK2013 +#if SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_SDK2013 // Shim to avoid hooking shims engine = (IVEngineServer *) ismm->GetEngineFactory()("VEngineServer023", nullptr); if (!engine)