Remove engine check for whether or not to search alt mapcycle paths.

This commit is contained in:
Nicholas Hastings 2015-05-18 09:16:36 -04:00
parent 11bf32f6f1
commit 2abb8e6335

View File

@ -87,31 +87,18 @@ 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, "%s", pMapCycleFileName);
}
}
void AddOrUpdateDefault(const char *name, const char *file)
{
char path[PLATFORM_MAX_PATH];