]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fixes scores not being reset in resetmatch warmup if sv_ready_restart_after_countdown...
authorz411 <electrik.persona@gmail.com>
Sat, 5 Feb 2022 11:47:38 +0000 (11:47 +0000)
committerterencehill <piuntn@gmail.com>
Sat, 5 Feb 2022 11:47:38 +0000 (11:47 +0000)
qcsrc/server/command/vote.qc

index d1be9e9b2e055a17456fa9a9e7f2e771d07fb62b..40b621aa9ba77e157f3d20f056e7f79e42290a86 100644 (file)
@@ -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