From: Mario Date: Tue, 18 Mar 2014 05:16:53 +0000 (+1100) Subject: Add a monsters mapinfo feature X-Git-Tag: xonotic-v0.8.0~195^2~3 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=8545da470d39a8a9d15e7df35cd6ea70a6e10321;p=xonotic%2Fxonotic-data.pk3dir.git Add a monsters mapinfo feature --- diff --git a/qcsrc/common/mapinfo.qc b/qcsrc/common/mapinfo.qc index feb0e0364..01cd2927d 100644 --- a/qcsrc/common/mapinfo.qc +++ b/qcsrc/common/mapinfo.qc @@ -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"); diff --git a/qcsrc/common/mapinfo.qh b/qcsrc/common/mapinfo.qh index 7746dfe3e..dc3776328 100644 --- a/qcsrc/common/mapinfo.qh +++ b/qcsrc/common/mapinfo.qh @@ -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