From 11bf32f6f1586c7cebde39f75becf07b1910b7d4 Mon Sep 17 00:00:00 2001 From: Nicholas Hastings Date: Wed, 13 May 2015 06:49:37 -0700 Subject: [PATCH 1/2] Enable finding mapcycle in cfg dir on sdk2013 and bms. --- core/logic/smn_maplists.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/logic/smn_maplists.cpp b/core/logic/smn_maplists.cpp index 9faba5d8..5063c8e1 100644 --- a/core/logic/smn_maplists.cpp +++ b/core/logic/smn_maplists.cpp @@ -91,7 +91,8 @@ public: const char *pMapCycleFileName = m_pMapCycleFile ? smcore.GetCvarString(m_pMapCycleFile) : "mapcycle.txt"; if (strcmp(pEngineName, "tf2") == 0 || strcmp(pEngineName, "css") == 0 - || strcmp(pEngineName, "dods") == 0 || strcmp(pEngineName, "hl2dm") == 0) + || strcmp(pEngineName, "dods") == 0 || strcmp(pEngineName, "hl2dm") == 0 + || strcmp(pEngineName, "sdk2013") == 0 || strcmp(pEngineName, "bms") == 0) { // These four games and Source SDK 2013 do a lookup in this order; so shall we. g_pSM->Format(pBuffer, maxlen, "cfg/%s", pMapCycleFileName); From 2abb8e63355d8b6ed0fc8d549990356d8556faf2 Mon Sep 17 00:00:00 2001 From: Nicholas Hastings Date: Mon, 18 May 2015 09:16:36 -0400 Subject: [PATCH 2/2] Remove engine check for whether or not to search alt mapcycle paths. --- core/logic/smn_maplists.cpp | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/core/logic/smn_maplists.cpp b/core/logic/smn_maplists.cpp index 5063c8e1..c1a1ac52 100644 --- a/core/logic/smn_maplists.cpp +++ b/core/logic/smn_maplists.cpp @@ -87,29 +87,16 @@ public: } void GetMapCycleFilePath(char *pBuffer, int maxlen) { - const char *pEngineName = smcore.GetSourceEngineName(); const char *pMapCycleFileName = m_pMapCycleFile ? smcore.GetCvarString(m_pMapCycleFile) : "mapcycle.txt"; - if (strcmp(pEngineName, "tf2") == 0 || strcmp(pEngineName, "css") == 0 - || strcmp(pEngineName, "dods") == 0 || strcmp(pEngineName, "hl2dm") == 0 - || strcmp(pEngineName, "sdk2013") == 0 || strcmp(pEngineName, "bms") == 0) - { - // These four games and Source SDK 2013 do a lookup in this order; so shall we. - g_pSM->Format(pBuffer, maxlen, "cfg/%s", pMapCycleFileName); - - if (!smcore.filesystem->FileExists(pBuffer, "GAME")) - { - g_pSM->Format(pBuffer, maxlen, "%s", pMapCycleFileName); - - if (!smcore.filesystem->FileExists(pBuffer, "GAME")) - { - g_pSM->Format(pBuffer, maxlen, "cfg/mapcycle_default.txt"); - } - } - } - else + g_pSM->Format(pBuffer, maxlen, "cfg/%s", pMapCycleFileName); + if (!smcore.filesystem->FileExists(pBuffer, "GAME")) { g_pSM->Format(pBuffer, maxlen, "%s", pMapCycleFileName); + if (!smcore.filesystem->FileExists(pBuffer, "GAME")) + { + g_pSM->Format(pBuffer, maxlen, "cfg/mapcycle_default.txt"); + } } } void AddOrUpdateDefault(const char *name, const char *file)