From ab7c93c9d0fcfa4c9689d3fdf91d71ea0e37c610 Mon Sep 17 00:00:00 2001 From: terencehill Date: Mon, 29 Jan 2018 17:27:29 +0100 Subject: [PATCH] Rewrite a code block so that it doesn't look like it depends on the above if condition --- qcsrc/server/client.qc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index 3d5f951a4..3333c04e4 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -1191,12 +1191,10 @@ void ClientConnect(entity this) } if (!teamplay && this.team_forced > 0) this.team_forced = 0; - { - int id = this.playerid; - this.playerid = 0; // silent - JoinBestTeam(this, false); // if the team number is valid, keep it - this.playerid = id; - } + int playerid_save = this.playerid; + this.playerid = 0; // silent + JoinBestTeam(this, false); // if the team number is valid, keep it + this.playerid = playerid_save; if (autocvar_sv_spectate || autocvar_g_campaign || this.team_forced < 0) { TRANSMUTE(Observer, this); -- 2.39.2