]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add a monsters mapinfo feature
authorMario <mario.mario@y7mail.com>
Tue, 18 Mar 2014 05:16:53 +0000 (16:16 +1100)
committerMario <mario.mario@y7mail.com>
Tue, 18 Mar 2014 05:16:53 +0000 (16:16 +1100)
qcsrc/common/mapinfo.qc
qcsrc/common/mapinfo.qh

index feb0e036420e49d47ce211390463ed8ccd951b9f..01cd2927d6f6fa334025435f54431546ecde3c8d 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
                        }
@@ -978,6 +980,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");
index 7746dfe3eb1d3de6912f129527e216af9dff873f..dc377632853301ebb1d217d9a09cc4ee339f2f9d 100644 (file)
@@ -81,6 +81,7 @@ REGISTER_GAMETYPE(_("Invasion"),inv,g_invasion,INVASION,"pointlimit=5");
 const float MAPINFO_FEATURE_WEAPONS       = 1; // not defined for minstagib-only maps
 const float MAPINFO_FEATURE_VEHICLES      = 2;
 const float MAPINFO_FEATURE_TURRETS       = 4;
+const float MAPINFO_FEATURE_MONSTERS      = 8;
 
 const float MAPINFO_FLAG_HIDDEN           = 1; // not in lsmaps/menu/vcall/etc., can just be changed to manually
 const float MAPINFO_FLAG_FORBIDDEN        = 2; // don't even allow the map by a cvar setting that allows hidden maps