]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
join queue: fix removal of AFK players
authorbones_was_here <bones_was_here@xonotic.au>
Fri, 7 Jun 2024 09:08:38 +0000 (19:08 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Mon, 5 Aug 2024 16:26:24 +0000 (02:26 +1000)
Was broken in 433e811eb85f24adf86b8a81679a5c9a6c273337

Improves documentation.

Signed-off-by: bones_was_here <bones_was_here@xonotic.au>
qcsrc/server/client.qc
qcsrc/server/clientkill.qc

index 3016275b9833f1876251bad1a5844ba048502253..0d804177bcf08a4055f41008f790e0e825879f27 100644 (file)
@@ -2900,6 +2900,10 @@ void PlayerFrame (entity this)
                                        else
                                                Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_MOVETOSPEC_IDLING, this.netname, maxidle_time);
                                        PutObserverInServer(this, true, true);
+                                       // Can't do this in PutObserverInServer() or SetPlayerTeam() cos it causes
+                                       // mouse2 (change spectate mode) to kick the player off the join queue.
+                                       this.wants_join = 0;
+                                       this.team_selected = false;
                                        // when the player is kicked off the server, these are called in ClientDisconnect()
                                        if (!TeamBalance_QueuedPlayersTagIn(this))
                                        if (autocvar_g_balance_teams_remove)
index d61481ab0b07633d250ff1a565669106224c5555..b8f128a335a0942b9d11ca2271dc010e22cef7e2 100644 (file)
@@ -28,10 +28,12 @@ void ClientKill_Now_TeamChange(entity this)
 
                if (this.wants_join)
                {
-                       this.wants_join = 0;
-                       this.team_selected = false;
                        Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_QUIT_QUEUE, this.netname);
                        SetPlayerTeam(this, -1, TEAM_CHANGE_SPECTATOR);
+                       // Can't do this in PutObserverInServer() or SetPlayerTeam() cos it causes
+                       // mouse2 (change spectate mode) to kick the player off the join queue.
+                       this.wants_join = 0;
+                       this.team_selected = false;
                }
                else
                {