]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
ClientCommand_selectteam improvement.
authorLyberta <lyberta@lyberta.net>
Sun, 6 Aug 2017 02:25:22 +0000 (05:25 +0300)
committerLyberta <lyberta@lyberta.net>
Sun, 6 Aug 2017 02:25:22 +0000 (05:25 +0300)
qcsrc/server/command/cmd.qc

index 6c5e3829f7ae31fe0e9d5ee401b703dc3771d28f..297ab8f0f37a95736c9c432e41c5deda30b99529 100644 (file)
@@ -385,16 +385,8 @@ void ClientCommand_selectteam(entity caller, float request, float argc)
                                sprint(caller, "^1You cannot change team, forbidden by the server.\n");
                                return;
                        }
-                       if (selection == -1)
-                       {
-                               ClientKill_TeamChange(caller, selection);
-                               if (!IS_PLAYER(caller))
-                               {
-                                       caller.team_selected = true; // avoids asking again for team selection on join
-                               }
-                               return;
-                       }
-                       if (autocvar_g_balance_teams && autocvar_g_balance_teams_prevent_imbalance)
+                       if ((selection != -1) && autocvar_g_balance_teams &&
+                               autocvar_g_balance_teams_prevent_imbalance)
                        {
                                CheckAllowedTeams(caller);
                                GetTeamCounts(caller);