From: Mario Date: Sun, 3 Jul 2022 14:41:48 +0000 (+1000) Subject: Clean up some oddly named gametype locals so that they don't overlap with an unrelate... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=104a469b2b014d9a869d5d85d500c33eb7ad59f3;p=xonotic%2Fxonotic-data.pk3dir.git Clean up some oddly named gametype locals so that they don't overlap with an unrelated local --- diff --git a/qcsrc/common/mapinfo.qc b/qcsrc/common/mapinfo.qc index 12744a079..f98ac58ec 100644 --- a/qcsrc/common/mapinfo.qc +++ b/qcsrc/common/mapinfo.qc @@ -922,20 +922,20 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, int pAllowGenerate, Gamet else if(t == "type") { t = car(s); s = cdr(s); - Gametype f = MapInfo_Type_FromString(t, true); + Gametype gt = MapInfo_Type_FromString(t, true); //if(WARN_COND) //LOG_WARN("Map ", pFilename, " contains the legacy 'type' keyword which is deprecated and will be removed in the future. Please migrate the mapinfo file to 'gametype'."); - if(f) - _MapInfo_Map_ApplyGametype (s, pGametypeToSet, f, true); + if(gt) + _MapInfo_Map_ApplyGametype (s, pGametypeToSet, gt, true); else if(WARN_COND) LOG_DEBUG("Map ", pFilename, " supports unknown game type ", t, ", ignored"); } else if(t == "gametype") { t = car(s); s = cdr(s); - Gametype f = MapInfo_Type_FromString(t, true); - if(f) - _MapInfo_Map_ApplyGametypeEx (s, pGametypeToSet, f); + Gametype gt = MapInfo_Type_FromString(t, true); + if(gt) + _MapInfo_Map_ApplyGametypeEx (s, pGametypeToSet, gt); else if(WARN_COND) LOG_DEBUG("Map ", pFilename, " supports unknown game type ", t, ", ignored"); } @@ -954,7 +954,7 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, int pAllowGenerate, Gamet } else { - t = car(s); s = cdr(s); float tf = stof(t); + t = car(s); s = cdr(s); float f = stof(t); if(s != "") { if(WARN_COND) @@ -962,7 +962,7 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, int pAllowGenerate, Gamet } else { - if(a >= d || b >= e || c >= tf) + if(a >= d || b >= e || c >= f) { if(WARN_COND) LOG_WARN("Map ", pFilename, " contains an incorrect size line, mins have to be < maxs"); @@ -974,7 +974,7 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, int pAllowGenerate, Gamet MapInfo_Map_mins.z = c; MapInfo_Map_maxs.x = d; MapInfo_Map_maxs.y = e; - MapInfo_Map_maxs.z = tf; + MapInfo_Map_maxs.z = f; } } } @@ -983,10 +983,10 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, int pAllowGenerate, Gamet { t = car(s); s = cdr(s); bool all = t == "all"; - Gametype f = NULL; - if(all || (f = MapInfo_Type_FromString(t, true))) + Gametype gt = NULL; + if(all || (gt = MapInfo_Type_FromString(t, true))) { - if((all ? MAPINFO_TYPE_ALL : f.m_flags) & pGametypeToSet.m_flags) + if((all ? MAPINFO_TYPE_ALL : gt.m_flags) & pGametypeToSet.m_flags) { _MapInfo_Parse_Settemp(pFilename, acl, 0, s, 1); } @@ -1000,10 +1000,10 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, int pAllowGenerate, Gamet { t = car(s); s = cdr(s); bool all = t == "all"; - Gametype f = NULL; - if(all || (f = MapInfo_Type_FromString(t, true))) + Gametype gt = NULL; + if(all || (gt = MapInfo_Type_FromString(t, true))) { - if((all ? MAPINFO_TYPE_ALL : f.m_flags) & pGametypeToSet.m_flags) + if((all ? MAPINFO_TYPE_ALL : gt.m_flags) & pGametypeToSet.m_flags) { _MapInfo_Parse_Settemp(pFilename, acl, 1, s, 1); }