]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Sanity (probable fix for maps not showing up when using legacy gametype names)
authorMario <mario@smbclan.net>
Sat, 11 May 2019 07:20:08 +0000 (17:20 +1000)
committerMario <mario@smbclan.net>
Sat, 11 May 2019 07:20:08 +0000 (17:20 +1000)
qcsrc/common/mapinfo.qc

index 307eb2773bff0db88146af8b3372b47ba11abc97..617bfe85e2cde2c78d3b0f1c8fd1e617732c34df 100644 (file)
@@ -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;
 }