]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mapinfo.qc
Merge branch 'master' into Mario/overkill
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mapinfo.qc
index b060b375f08df8f4aeaa7bd1349ab17b4d3ea434..2230d5c790385c0823b1184101395f4edf95396e 100644 (file)
@@ -566,6 +566,15 @@ string _MapInfo_GetDefaultEx(float t)
        return "";
 }
 
+float _MapInfo_GetTeamPlayBool(float t)
+{
+       entity e;
+       for(e = MapInfo_Type_first; e; e = e.enemy)
+               if(t == e.items)
+                       return e.team;
+       return FALSE;
+}
+
 void _MapInfo_Map_ApplyGametypeEx(string s, float pWantedType, float pThisType)
 {
        string sa, k, v;
@@ -688,6 +697,18 @@ float MapInfo_Type_FromString(string t)
                t = "inv";
                print("'. Should use '", t, "'.\n");
        }
+       if(t == "assault")
+       {
+               print("MapInfo_Type_FromString (probably ", MapInfo_Map_bspname, "): using deprecated name '", t);
+               t = "as";
+               print("'. Should use '", t, "'.\n");
+       }
+       if(t == "race")
+       {
+               print("MapInfo_Type_FromString (probably ", MapInfo_Map_bspname, "): using deprecated name '", t);
+               t = "rc";
+               print("'. Should use '", t, "'.\n");
+       }
        if(t == "all")
                return MAPINFO_TYPE_ALL;
        for(e = MapInfo_Type_first; e; e = e.enemy)
@@ -1015,7 +1036,7 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, float pAllowGenerate, flo
                {
                        t = car(s); s = cdr(s);
                        f = MapInfo_Type_FromString(t);
-                       print("Map ", pFilename, " contains the legacy 'type' keyword which is deprecated and will be removed in the future. Please migrate the mapinfo file to 'gametype'.\n");
+                       dprint("Map ", pFilename, " contains the legacy 'type' keyword which is deprecated and will be removed in the future. Please migrate the mapinfo file to 'gametype'.\n");
                        if(f)
                                _MapInfo_Map_ApplyGametype (s, pGametypeToSet, f, TRUE);
                        else
@@ -1121,7 +1142,7 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, float pAllowGenerate, flo
        else if(MapInfo_isRedundant(MapInfo_Map_bspname, MapInfo_Map_title))
                MapInfo_Map_titlestring = MapInfo_Map_title;
        else
-               MapInfo_Map_titlestring = sprintf(_("%s: %s"), MapInfo_Map_bspname, MapInfo_Map_title);
+               MapInfo_Map_titlestring = sprintf("%s: %s", MapInfo_Map_bspname, MapInfo_Map_title);
 
        MapInfo_Cache_Store();
        if(MapInfo_Map_supportedGametypes != 0)
@@ -1212,7 +1233,7 @@ float MapInfo_CurrentFeatures()
 {
        float req;
        req = 0;
-       if(!(cvar("g_lms") || cvar("g_minstagib") || cvar("g_nix") || cvar("g_weaponarena") || !cvar("g_pickup_items") || cvar("g_race") || cvar("g_cts") || cvar("g_nexball")))
+       if(!(cvar("g_lms") || cvar("g_instagib") || cvar("g_nix") || cvar("g_weaponarena") || !cvar("g_pickup_items") || cvar("g_race") || cvar("g_cts") || cvar("g_nexball")))
                req |= MAPINFO_FEATURE_WEAPONS;
        return req;
 }