]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
more mapinfo cleanup
authorRudolf Polzer <divverent@alientrap.org>
Wed, 14 Jul 2010 14:35:39 +0000 (16:35 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Wed, 14 Jul 2010 14:35:39 +0000 (16:35 +0200)
qcsrc/common/mapinfo.qc

index 9bb7fa2bbaef56f8a13163cf196d49d5674bdb2c..1fd2cf8093422d3cafd2b3760e8db48f16d28391 100644 (file)
@@ -426,11 +426,15 @@ void _MapInfo_Map_ApplyGametype(string s, float pWantedType, float pThisType, fl
        }
        else
        {
-               cvar_set("fraglimit", car(s));
+               sa = car(s);
+               if(sa != "")
+                       cvar_set("fraglimit", sa);
                s = cdr(s);
        }
 
-       cvar_set("timelimit", car(s));
+       sa = car(s);
+       if(sa != "")
+               cvar_set("timelimit", sa);
        s = cdr(s);
 
        if(pWantedType == MAPINFO_TYPE_TEAM_DEATHMATCH)
@@ -481,15 +485,27 @@ void _MapInfo_Map_ApplyGametype(string s, float pWantedType, float pThisType, fl
        if(pWantedType == MAPINFO_TYPE_CTS)
        {
                sa = car(s);
-               if(sa != "")
-                       cvar_set("fraglimit", sa);
+
+               // this is the skill of the map
+               // not parsed by anything yet
+               // for map databases
+               //if(sa != "")
+               //      cvar_set("fraglimit", sa);
+
                s = cdr(s);
        }
 
-       sa = car(s);
-       if(sa != "")
-               cvar_set("leadlimit", sa);
-       s = cdr(s);
+       if(pWantedType == MAPINFO_TYPE_ASSAULT || pWantedType == MAPINFO_TYPE_ONSLAUGHT || pWantedType == MAPINFO_TYPE_CTS) // these modes don't use fraglimit
+       {
+               cvar_set("leadlimit", "0");
+       }
+       else
+       {
+               sa = car(s);
+               if(sa != "")
+                       cvar_set("leadlimit", sa);
+               s = cdr(s);
+       }
 }
 
 float MapInfo_Type_FromString(string t)