From: Rudolf Polzer Date: Wed, 14 Jul 2010 14:35:39 +0000 (+0200) Subject: more mapinfo cleanup X-Git-Tag: xonotic-v0.1.0preview~266^2~27^2~1 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=db8da6fcca5f306d314d9effc95e60ffd33fe504;p=xonotic%2Fxonotic-data.pk3dir.git more mapinfo cleanup --- diff --git a/qcsrc/common/mapinfo.qc b/qcsrc/common/mapinfo.qc index 9bb7fa2bb..1fd2cf809 100644 --- a/qcsrc/common/mapinfo.qc +++ b/qcsrc/common/mapinfo.qc @@ -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)