From: Lyberta Date: Sun, 6 Aug 2017 02:18:06 +0000 (+0300) Subject: JoinBestTeam improvement. X-Git-Tag: xonotic-v0.8.5~2482^2~3 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f0e167a7726884152c7f0856c531e5ffcaadd4c9;p=xonotic%2Fxonotic-data.pk3dir.git JoinBestTeam improvement. --- diff --git a/qcsrc/server/teamplay.qc b/qcsrc/server/teamplay.qc index 92cd8ebcc..dfa9b89f9 100644 --- a/qcsrc/server/teamplay.qc +++ b/qcsrc/server/teamplay.qc @@ -851,12 +851,11 @@ int JoinBestTeam(entity this, bool only_return_best, bool force_best_team) // find out what teams are available CheckAllowedTeams(this); - int selected_team; - // if we don't care what team he ends up on, put him on whatever team he entered as. // if he's not on a valid team, then let other code put him on the smallest team if (!force_best_team) { + int selected_team; if( c1 >= 0 && this.team == NUM_TEAM_1) selected_team = this.team; else if(c2 >= 0 && this.team == NUM_TEAM_2)