From: Rudolf Polzer Date: Tue, 10 Nov 2015 13:52:25 +0000 (+0100) Subject: mapinfo: New feature gameinfo_min: restrict maps to only appear in the default maplis... X-Git-Tag: xonotic-v0.8.2~1680 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=686e152a4f67d71bc83bcbdd27afda1752f6ed06;p=xonotic%2Fxonotic-data.pk3dir.git mapinfo: New feature gameinfo_min: restrict maps to only appear in the default maplist starting with a given gameversion. --- diff --git a/qcsrc/common/mapinfo.qc b/qcsrc/common/mapinfo.qc index 67524b83c..5ca1c3803 100644 --- a/qcsrc/common/mapinfo.qc +++ b/qcsrc/common/mapinfo.qc @@ -1017,6 +1017,11 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, int pAllowGenerate, int p { MapInfo_Map_flags |= MAPINFO_FLAG_NOAUTOMAPLIST; } + else if(t == "gameversion_min") + { + if (cvar("gameversion") < stof(s)) + MapInfo_Map_flags |= MAPINFO_FLAG_NOAUTOMAPLIST; + } else if(t == "type") { t = car(s); s = cdr(s);