From: Rudolf Polzer Date: Thu, 1 Apr 2010 05:00:45 +0000 (+0200) Subject: fix the latest teamplay change (choose red for campaign) X-Git-Tag: xonotic-v0.1.0preview~670 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2d2bbf5df8cb4a1dcb5a10312034c957162f0a71;p=xonotic%2Fxonotic-data.pk3dir.git fix the latest teamplay change (choose red for campaign) --- diff --git a/qcsrc/server/teamplay.qc b/qcsrc/server/teamplay.qc index 7d42a533d..0798b29b2 100644 --- a/qcsrc/server/teamplay.qc +++ b/qcsrc/server/teamplay.qc @@ -625,7 +625,7 @@ void CheckAllowedTeams (entity for_whom) c1 = c2 = c3 = c4 = -1; cb1 = cb2 = cb3 = cb4 = 0; - if(g_campaign && pl && clienttype(pl) == CLIENTTYPE_REAL) + if(cvar("g_campaign") && for_whom && clienttype(for_whom) == CLIENTTYPE_REAL) { c1 = 0; // only allow RED team for player joining } @@ -804,7 +804,7 @@ float FindSmallestTeam(entity pl, float ignore_pl) if(totalteams <= 1) { - if(g_campaign && pl && clienttype(pl) == CLIENTTYPE_REAL) + if(cvar("g_campaign") && pl && clienttype(pl) == CLIENTTYPE_REAL) return 1; // special case for campaign and player joining else if(g_domination) error("Too few teams available for domination\n");