]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/command/sv_cmd.qc
Merge branch 'TimePath/itemstime2.0_regressions' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / command / sv_cmd.qc
index 910d3e68e4e77fb34c2bd4e54836331044750024..0bf2df320b9475adfddeb9e7ba8c2782b87a5053 100644 (file)
@@ -1,5 +1,6 @@
+#include "../../common/command/command.qh"
 #include "sv_cmd.qh"
-#include "../_.qh"
+#include "../_all.qh"
 
 #include "banning.qh"
 #include "cmd.qh"
@@ -28,8 +29,6 @@
 #include "../../common/teams.qh"
 #include "../../common/util.qh"
 
-#include "../../common/command/shared_defs.qh"
-
 #include "../../common/monsters/sv_monsters.qh"
 
 #include "../../warpzonelib/mathlib.qh"
@@ -1400,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);
 
@@ -1413,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 (;;)
                                        {