]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
fix the latest teamplay change (choose red for campaign)
authorRudolf Polzer <rpolzer@nb-04.(none)>
Thu, 1 Apr 2010 05:00:45 +0000 (07:00 +0200)
committerRudolf Polzer <rpolzer@nb-04.(none)>
Thu, 1 Apr 2010 09:50:03 +0000 (11:50 +0200)
qcsrc/server/teamplay.qc

index 7d42a533d722b34475eb4a004720ce5eca2b4239..0798b29b29b2769194190d7200d39ce3a6bd32ff 100644 (file)
@@ -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");