From: z411 Date: Sat, 5 Feb 2022 11:47:38 +0000 (+0000) Subject: Fixes scores not being reset in resetmatch warmup if sv_ready_restart_after_countdown... X-Git-Tag: xonotic-v0.8.5~211^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b55e4dbb7945be819e8131cc82c1da7e4e0b1626;p=xonotic%2Fxonotic-data.pk3dir.git Fixes scores not being reset in resetmatch warmup if sv_ready_restart_after_countdown is 1 --- diff --git a/qcsrc/server/command/vote.qc b/qcsrc/server/command/vote.qc index d1be9e9b2..40b621aa9 100644 --- a/qcsrc/server/command/vote.qc +++ b/qcsrc/server/command/vote.qc @@ -344,7 +344,11 @@ void reset_map(bool dorespawn, bool is_fake_round_start) return; if (!is_fake_round_start) + { + Score_ClearAll(); PlayerStats_GameReport_Reset_All(); + } + if (round_handler_IsActive()) round_handler_Reset(game_starttime); } @@ -415,7 +419,6 @@ void reset_map(bool dorespawn, bool is_fake_round_start) void ReadyRestart_think(entity this) { reset_map(true, false); - Score_ClearAll(); delete(this); } @@ -472,7 +475,9 @@ void ReadyRestart_force(bool is_fake_round_start) FOREACH_CLIENT(IS_PLAYER(it) && IS_REAL_CLIENT(it), { CS(it).allowed_timeouts = autocvar_sv_timeout_number; }); } - if (!sv_ready_restart_after_countdown || warmup_stage) reset_map(true, is_fake_round_start); + if (!sv_ready_restart_after_countdown || warmup_stage) + reset_map(true, is_fake_round_start); + if (autocvar_sv_eventlog) GameLogEcho(":restart"); } @@ -481,10 +486,6 @@ void ReadyRestart(bool forceWarmupEnd) if (MUTATOR_CALLHOOK(ReadyRestart_Deny) || intermission_running || race_completing) localcmd("restart\n"); else localcmd("\nsv_hook_readyrestart\n"); - // Reset ALL scores, but only do that at the beginning of the countdown if sv_ready_restart_after_countdown is off! - // Otherwise scores could be manipulated during the countdown. - if (!sv_ready_restart_after_countdown) Score_ClearAll(); - if(forceWarmupEnd) warmup_stage = 0; // forcefully end warmup and go to match stage else