From: Lyberta Date: Sun, 6 Aug 2017 02:25:22 +0000 (+0300) Subject: ClientCommand_selectteam improvement. X-Git-Tag: xonotic-v0.8.5~2482^2~2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=db8df15de152221a99a61733cf0e2b89cc6b406e;p=xonotic%2Fxonotic-data.pk3dir.git ClientCommand_selectteam improvement. --- diff --git a/qcsrc/server/command/cmd.qc b/qcsrc/server/command/cmd.qc index 6c5e3829f..297ab8f0f 100644 --- a/qcsrc/server/command/cmd.qc +++ b/qcsrc/server/command/cmd.qc @@ -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);