X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fmapinfo.qc;h=05c93865dbcceed7c2606d9cb567b727e3fe8ad7;hb=64b6c7420b3e1c307f408a9f17d9c765a268621a;hp=1b32c9d1d5a076c3825f5ea9900522282f7abd40;hpb=a7b24450e4c7ca75636df1375d01d2266bd00c8c;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/mapinfo.qc b/qcsrc/common/mapinfo.qc index 1b32c9d1d5..05c93865db 100644 --- a/qcsrc/common/mapinfo.qc +++ b/qcsrc/common/mapinfo.qc @@ -242,6 +242,8 @@ float _MapInfo_Generate(string pFilename) // 0: failure, 1: ok ent, 2: ok bsp spawnpoints = 0; spawnplaces = 0; _MapInfo_Map_worldspawn_music = ""; + mapMins = '0 0 0'; + mapMaxs = '0 0 0'; for(;;) { @@ -536,7 +538,7 @@ string _MapInfo_GetDefaultEx(float t) { entity e; for(e = MapInfo_Type_first; e; e = e.enemy) - if(t == e.weapons) + if(t == e.items) return e.model2; return ""; } @@ -637,11 +639,29 @@ void _MapInfo_Map_ApplyGametypeEx(string s, float pWantedType, float pThisType) float MapInfo_Type_FromString(string t) { entity e; + if(t == "nexball") + { + print("MapInfo_Type_FromString (probably ", MapInfo_Map_bspname, "): using deprecated name '", t); + t = "nb"; + print("'. Should use '", t, "'.\n"); + } + if(t == "freezetag") + { + print("MapInfo_Type_FromString (probably ", MapInfo_Map_bspname, "): using deprecated name '", t); + t = "ft"; + print("'. Should use '", t, "'.\n"); + } + if(t == "keepaway") + { + print("MapInfo_Type_FromString (probably ", MapInfo_Map_bspname, "): using deprecated name '", t); + t = "ka"; + print("'. Should use '", t, "'.\n"); + } if(t == "all") return MAPINFO_TYPE_ALL; for(e = MapInfo_Type_first; e; e = e.enemy) if(t == e.mdl) - return e.weapons; + return e.items; return 0; } @@ -651,7 +671,7 @@ string MapInfo_Type_ToString(float t) if(t == MAPINFO_TYPE_ALL) return "all"; for(e = MapInfo_Type_first; e; e = e.enemy) - if(t == e.weapons) + if(t == e.items) return e.mdl; return ""; } @@ -660,7 +680,7 @@ string MapInfo_Type_ToText(float t) { entity e; for(e = MapInfo_Type_first; e; e = e.enemy) - if(t == e.weapons) + if(t == e.items) return e.message; return _("@!#%'n Tuba Throwing"); } @@ -925,7 +945,7 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, float pAllowGenerate, flo MapInfo_Map_author = s; else if(t == "has") { - t = car(s); s = cdr(s); + t = car(s); // s = cdr(s); if (t == "weapons") MapInfo_Map_supportedFeatures |= MAPINFO_FEATURE_WEAPONS; else if(t == "turrets") MapInfo_Map_supportedFeatures |= MAPINFO_FEATURE_TURRETS; else if(t == "vehicles") MapInfo_Map_supportedFeatures |= MAPINFO_FEATURE_VEHICLES; @@ -1157,8 +1177,8 @@ float MapInfo_CurrentGametype() prev = cvar("gamecfg"); for(e = MapInfo_Type_first; e; e = e.enemy) if(cvar(e.netname)) - if(prev != e.weapons) - return e.weapons; + if(prev != e.items) + return e.items; if(prev) return prev; return MAPINFO_TYPE_DEATHMATCH; @@ -1187,7 +1207,7 @@ void MapInfo_SwitchGameType(float t) { entity e; for(e = MapInfo_Type_first; e; e = e.enemy) - cvar_set(e.netname, (t == e.weapons) ? "1" : "0"); + cvar_set(e.netname, (t == e.items) ? "1" : "0"); } void MapInfo_LoadMap(string s, float reinit)