]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mapinfo.qc
Merge remote-tracking branch 'origin/mrbougo/quickfix-mapinfo_gen_typo', fixes #1756
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mapinfo.qc
index 82c5673d8b44ee22cb479844517c44e8e30cea73..aa906d68418999f3c01518d5ba2546bd2e66c6c5 100644 (file)
@@ -379,7 +379,7 @@ float _MapInfo_Generate(string pFilename) // 0: failure, 1: ok ent, 2: ok bsp
        if(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_RACE)
        if(!spawnplaces)
        {
-               MapInfo_Map_supportedGametypes &~= MAPINFO_TYPE_RACE;
+               MapInfo_Map_supportedGametypes &= ~MAPINFO_TYPE_RACE;
                MapInfo_Map_supportedGametypes |= MAPINFO_TYPE_CTS;
        }
 
@@ -708,6 +708,7 @@ string MapInfo_Type_ToText(float t)
        for(e = MapInfo_Type_first; e; e = e.enemy)
                if(t == e.items)
                        return e.message;
+       /* xgettext:no-c-format */
        return _("@!#%'n Tuba Throwing");
 }
 
@@ -912,7 +913,7 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, float pAllowGenerate, flo
                        else
                                fputs(fh, "// uncomment this if you added turrets: has turrets\n");
                        if(MapInfo_Map_supportedFeatures & MAPINFO_FEATURE_VEHICLES)
-                               fputs(fh, "has weapons\n");
+                               fputs(fh, "has vehicles\n");
                        else
                                fputs(fh, "// uncomment this if you added vehicles: has vehicles\n");
                        if(MapInfo_Map_flags & MAPINFO_FLAG_FRUSTRATING)
@@ -991,6 +992,10 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, float pAllowGenerate, flo
                {
                        MapInfo_Map_flags |= MAPINFO_FLAG_FRUSTRATING;
                }
+               else if(t == "noautomaplist")
+               {
+                       MapInfo_Map_flags |= MAPINFO_FLAG_NOAUTOMAPLIST;
+               }
                else if(t == "type")
                {
                        t = car(s); s = cdr(s);
@@ -1073,20 +1078,21 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, float pAllowGenerate, flo
                }
                else if(t == "fog")
                {
-                       if not(cvar_value_issafe(t))
+                       if not(cvar_value_issafe(s))
                                print("Map ", pFilename, " contains a potentially harmful fog setting, ignored\n");
                        else
                                MapInfo_Map_fog = s;
                }
                else if(t == "cdtrack")
                {
-                       if(pGametypeToSet)
+                       t = car(s); s = cdr(s);
+                       if(pGametypeToSet) // FIXME is this check right here?
                        {
                                if not(cvar_value_issafe(t))
                                        print("Map ", pFilename, " contains a potentially harmful cdtrack, ignored\n");
                                else
                                        MapInfo_Map_clientstuff = strcat(
-                                               MapInfo_Map_clientstuff, "cd loop \"", s, "\"\n"
+                                               MapInfo_Map_clientstuff, "cd loop \"", t, "\"\n"
                                        );
                        }
                }