Merge commit '40b7b8b8f77676', fixes #1937
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / command / cmd.qc
index 2a51eed..7842448 100644 (file)
@@ -462,8 +462,9 @@ void ClientCommand_selectteam(float request, float argc)
                                                                        {
                                                                                if(autocvar_g_balance_teams && autocvar_g_balance_teams_prevent_imbalance)
                                                                                {
+                                                                                       CheckAllowedTeams(self);
                                                                                        GetTeamCounts(self);
-                                                                                       if(!TeamSmallerEqThanTeam(selection, self.team, self))
+                                                                                       if(!TeamSmallerEqThanTeam(Team_TeamToNumber(selection), Team_TeamToNumber(self.team), self))
                                                                                        {
                                                                                                sprint(self, "Cannot change to a larger/better/shinier team\n");
                                                                                                return;