]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
mapinfo: New feature gameinfo_min: restrict maps to only appear in the default maplis...
authorRudolf Polzer <divVerent@xonotic.org>
Tue, 10 Nov 2015 13:52:25 +0000 (14:52 +0100)
committerRudolf Polzer <divVerent@xonotic.org>
Tue, 10 Nov 2015 13:54:57 +0000 (14:54 +0100)
qcsrc/common/mapinfo.qc

index 67524b83c1b71c782ee2558288c5b664426a799a..5ca1c3803da30ea19467f6daaa21074ec4ac2d74 100644 (file)
@@ -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);