From: Mario Date: Sat, 11 May 2019 07:20:08 +0000 (+1000) Subject: Sanity (probable fix for maps not showing up when using legacy gametype names) X-Git-Tag: xonotic-v0.8.5~1505 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7532c56c2f30393cd8a0d5636d4b4705a81e4994;p=xonotic%2Fxonotic-data.pk3dir.git Sanity (probable fix for maps not showing up when using legacy gametype names) --- diff --git a/qcsrc/common/mapinfo.qc b/qcsrc/common/mapinfo.qc index 307eb2773..617bfe85e 100644 --- a/qcsrc/common/mapinfo.qc +++ b/qcsrc/common/mapinfo.qc @@ -589,10 +589,10 @@ void _MapInfo_Map_ApplyGametypeEx(string s, Gametype pWantedType, Gametype pThis } } -Gametype MapInfo_Type_FromString(string str) +Gametype MapInfo_Type_FromString(string gtype) { string replacement = ""; - switch (str) + switch (gtype) { case "nexball": replacement = "nb"; break; case "freezetag": replacement = "ft"; break; @@ -603,10 +603,10 @@ Gametype MapInfo_Type_FromString(string str) } if (replacement != "" && WARN_COND) { - LOG_WARNF("MapInfo_Type_FromString (probably %s): using deprecated name '%s'. Should use '%s'.", MapInfo_Map_bspname, str, replacement); - str = replacement; + LOG_WARNF("MapInfo_Type_FromString (probably %s): using deprecated name '%s'. Should use '%s'.", MapInfo_Map_bspname, gtype, replacement); + gtype = replacement; } - FOREACH(Gametypes, it.mdl == str, return it); + FOREACH(Gametypes, it.mdl == gtype, return it); return NULL; }