From 7532c56c2f30393cd8a0d5636d4b4705a81e4994 Mon Sep 17 00:00:00 2001 From: Mario Date: Sat, 11 May 2019 17:20:08 +1000 Subject: [PATCH] Sanity (probable fix for maps not showing up when using legacy gametype names) --- qcsrc/common/mapinfo.qc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/qcsrc/common/mapinfo.qc b/qcsrc/common/mapinfo.qc index 307eb2773b..617bfe85e2 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; } -- 2.39.2