]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/command/sv_cmd.qc
Extract more lib functions
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / command / sv_cmd.qc
index 43c53792e5a755ea5e991625924974ac30b40f78..29e75b63b2a0121c1a62e336acc3ebda2ae2e6c3 100644 (file)
@@ -31,7 +31,6 @@
 
 #include "../../common/monsters/sv_monsters.qh"
 
-#include "../../warpzonelib/mathlib.qh"
 
 void PutObserverInServer (void);
 
@@ -1399,7 +1398,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 +1412,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 (;;)
                                        {