From: terencehill Date: Thu, 11 Jun 2015 22:57:24 +0000 (+0200) Subject: shuffleteams: properly detect ca players. It fixes #1471 "Shuffleteams results in... X-Git-Tag: xonotic-v0.8.1~47^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5aad7fb6cd91e7da6bc6479322f69991b8fe8db1;p=xonotic%2Fxonotic-data.pk3dir.git shuffleteams: properly detect ca players. It fixes #1471 "Shuffleteams results in uneven teams (CA)" --- diff --git a/qcsrc/server/command/sv_cmd.qc b/qcsrc/server/command/sv_cmd.qc index 43c53792e..0bf2df320 100644 --- a/qcsrc/server/command/sv_cmd.qc +++ b/qcsrc/server/command/sv_cmd.qc @@ -1399,7 +1399,8 @@ void GameCommand_shuffleteams(float request) // count the total amount of players and total amount of teams t_players = 0; t_teams = 0; - FOR_EACH_PLAYER(tmp_player) + FOR_EACH_CLIENT(tmp_player) + if(IS_PLAYER(tmp_player) || tmp_player.caplayer) { CheckAllowedTeams(tmp_player); @@ -1412,7 +1413,8 @@ void GameCommand_shuffleteams(float request) } // build a list of the players in a random order - FOR_EACH_PLAYER(tmp_player) + FOR_EACH_CLIENT(tmp_player) + if(IS_PLAYER(tmp_player) || tmp_player.caplayer) { for (;;) {