X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fcommon%2Fmapinfo.qc;h=16e572615b1ca4899f9a1fbfc13261339c34f267;hp=b4dbda25f2bc2b2617c37342f460e2e2715e6a8f;hb=6545f51bb6cadeb9f10e1dadf48492ed39108e1b;hpb=7ba1f46ba161d21ffd81e032f35c49b9da9f4d63 diff --git a/qcsrc/common/mapinfo.qc b/qcsrc/common/mapinfo.qc index b4dbda25f..16e572615 100644 --- a/qcsrc/common/mapinfo.qc +++ b/qcsrc/common/mapinfo.qc @@ -379,7 +379,7 @@ float _MapInfo_Generate(string pFilename) // 0: failure, 1: ok ent, 2: ok bsp if(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_RACE) if(!spawnplaces) { - MapInfo_Map_supportedGametypes &~= MAPINFO_TYPE_RACE; + MapInfo_Map_supportedGametypes &= ~MAPINFO_TYPE_RACE; MapInfo_Map_supportedGametypes |= MAPINFO_TYPE_CTS; } @@ -476,6 +476,22 @@ void _MapInfo_Map_ApplyGametype(string s, float pWantedType, float pThisType, fl s = cdr(s); } + if(pWantedType == MAPINFO_TYPE_CA) + { + sa = car(s); + if(sa != "") + cvar_set("g_ca_teams", sa); + s = cdr(s); + } + + if(pWantedType == MAPINFO_TYPE_FREEZETAG) + { + sa = car(s); + if(sa != "") + cvar_set("g_freezetag_teams", sa); + s = cdr(s); + } + if(pWantedType == MAPINFO_TYPE_CTF) { sa = car(s); @@ -566,6 +582,8 @@ void _MapInfo_Map_ApplyGametypeEx(string s, float pWantedType, float pThisType) cvar_set("leadlimit", cvar_defstring("leadlimit")); cvar_set("fraglimit", cvar_defstring("fraglimit")); cvar_set("g_tdm_teams", cvar_defstring("g_tdm_teams")); + cvar_set("g_ca_teams", cvar_defstring("g_ca_teams")); + cvar_set("g_freezetag_teams", cvar_defstring("g_freezetag_teams")); cvar_set("g_keyhunt_teams", cvar_defstring("g_keyhunt_teams")); cvar_set("g_domination_default_teams", cvar_defstring("g_domination_default_teams")); cvar_set("g_race_qualifying_timelimit", cvar_defstring("g_race_qualifying_timelimit")); @@ -613,6 +631,8 @@ void _MapInfo_Map_ApplyGametypeEx(string s, float pWantedType, float pThisType) else if(k == "teams") { cvar_set("g_tdm_teams", v); + cvar_set("g_ca_teams", v); + cvar_set("g_freezetag_teams", v); cvar_set("g_keyhunt_teams", v); cvar_set("g_domination_default_teams", v); } @@ -688,6 +708,7 @@ string MapInfo_Type_ToText(float t) for(e = MapInfo_Type_first; e; e = e.enemy) if(t == e.items) return e.message; + /* xgettext:no-c-format */ return _("@!#%'n Tuba Throwing"); } @@ -1053,20 +1074,21 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, float pAllowGenerate, flo } else if(t == "fog") { - if not(cvar_value_issafe(t)) + if not(cvar_value_issafe(s)) print("Map ", pFilename, " contains a potentially harmful fog setting, ignored\n"); else MapInfo_Map_fog = s; } else if(t == "cdtrack") { - if(pGametypeToSet) + t = car(s); s = cdr(s); + if(pGametypeToSet) // FIXME is this check right here? { if not(cvar_value_issafe(t)) print("Map ", pFilename, " contains a potentially harmful cdtrack, ignored\n"); else MapInfo_Map_clientstuff = strcat( - MapInfo_Map_clientstuff, "cd loop \"", s, "\"\n" + MapInfo_Map_clientstuff, "cd loop \"", t, "\"\n" ); } }