From 687f119040020ae775f0e52cf8fdd814c6e3b09f Mon Sep 17 00:00:00 2001 From: bones_was_here Date: Sat, 10 May 2025 20:09:14 +1000 Subject: [PATCH] join queue: join all queued players when returning to warmup Otherwise they're left in an inconsistent state because there's no queueing when joining during warmup. --- qcsrc/server/client.qc | 2 +- qcsrc/server/command/vote.qc | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index cb38762e6f..6273348803 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -2106,7 +2106,7 @@ void Join(entity this, bool queued_join) else if (this.wants_join) { // Get queued player's attention - if (game_starttime <= time) // No countdown in progress + if (game_starttime <= time && !warmup_stage) // No countdown in progress and not returning to warmup with ReadyRestart Send_Notification(NOTIF_ONE_ONLY, this, MSG_ANNCE, ANNCE_BEGIN); Send_Notification(NOTIF_ONE_ONLY, this, MSG_CENTER, APP_TEAM_NUM(this.team, CENTER_JOIN_PLAY_TEAM)); } diff --git a/qcsrc/server/command/vote.qc b/qcsrc/server/command/vote.qc index e9153e5479..7ef38e5353 100644 --- a/qcsrc/server/command/vote.qc +++ b/qcsrc/server/command/vote.qc @@ -486,6 +486,16 @@ void ReadyRestart_force(bool is_fake_round_start) restart_timer.nextthink = game_starttime; } + // If we're returning to warmup join/switch all queued players for consistency: + // there's no queueing in warmup and imbalances are handled by sv_teamnagger blocking end of warmup. + if (warmup_stage) + { + // First pass: join player(s) queued for specific team(s) + FOREACH_CLIENT(it.wants_join > 0, Join(it, false)); + // Second pass: join player(s) queued for team autoselection + FOREACH_CLIENT(it.wants_join < 0, Join(it, false)); + } + // after a restart every players number of allowed timeouts gets reset, too if (autocvar_sv_timeout) { -- 2.39.5