]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mapinfo.qc
Some random fixes and stuff (centerprints converted to notifications, less spam when...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mapinfo.qc
index a09689b089175176c6394d5857e397fd51c8bf82..830c86db9019c6f52d9d7187d07c644a15e8502c 100644 (file)
@@ -343,6 +343,8 @@ float _MapInfo_Generate(string pFilename) // 0: failure, 1: ok ent, 2: ok bsp
                                        MapInfo_Map_supportedFeatures |= MAPINFO_FEATURE_TURRETS;
                                else if(startsWith(v, "vehicle_"))
                                        MapInfo_Map_supportedFeatures |= MAPINFO_FEATURE_VEHICLES;
+                               else if(startsWith(v, "monster_"))
+                                       MapInfo_Map_supportedFeatures |= MAPINFO_FEATURE_MONSTERS;
                                else if(v == "target_music" || v == "trigger_music")
                                        _MapInfo_Map_worldspawn_music = string_null; // don't use regular BGM
                        }
@@ -631,6 +633,7 @@ void _MapInfo_Map_ApplyGametypeEx(string s, float pWantedType, float pThisType)
                        cvar_set("g_freezetag_teams", v);
                        cvar_set("g_keyhunt_teams", v);
                        cvar_set("g_domination_default_teams", v);
+                       cvar_set("g_invasion_teams", v);
                }
                else if(k == "qualifying_timelimit")
                {
@@ -987,6 +990,7 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, float pAllowGenerate, flo
                        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;
+                       else if(t == "monsters") MapInfo_Map_supportedFeatures |= MAPINFO_FEATURE_MONSTERS;
                        else if(t == "new_toys") MapInfo_Map_supportedFeatures |= MAPINFO_FEATURE_WEAPONS;
                        else
                                dprint("Map ", pFilename, " supports unknown feature ", t, ", ignored\n");
@@ -1011,7 +1015,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
@@ -1141,8 +1145,7 @@ float MapInfo_Get_ByName(string pFilename, float pAllowGenerate, float pGametype
        {
                if(!(MapInfo_Map_supportedGametypes & pGametypeToSet))
                {
-                       //error("Can't select the requested game type. This should never happen as the caller should prevent it!\n");
-                       return 0;
+                       error("Can't select the requested game type. This should never happen as the caller should prevent it!\n");
                        //_MapInfo_Map_ApplyGametypeEx("", pGametypeToSet, MAPINFO_TYPE_DEATHMATCH);
                        //return;
                }