From 96c759c02646c7969a661659decd11ca0f8ee32e Mon Sep 17 00:00:00 2001 From: terencehill Date: Fri, 3 Mar 2023 12:06:59 +0100 Subject: [PATCH] Remove an unused parameter from reset_map --- qcsrc/server/command/vote.qc | 29 +++++++++++++---------------- qcsrc/server/command/vote.qh | 2 +- qcsrc/server/round_handler.qc | 2 +- 3 files changed, 15 insertions(+), 18 deletions(-) diff --git a/qcsrc/server/command/vote.qc b/qcsrc/server/command/vote.qc index a207b226b..28fa7e7c0 100644 --- a/qcsrc/server/command/vote.qc +++ b/qcsrc/server/command/vote.qc @@ -335,7 +335,7 @@ void VoteThink() // ======================= // Resets the state of all clients, items, weapons, waypoints, ... of the map. -void reset_map(bool dorespawn, bool is_fake_round_start) +void reset_map(bool is_fake_round_start) { if (time <= game_starttime) { @@ -396,21 +396,18 @@ void reset_map(bool dorespawn, bool is_fake_round_start) // Moving the player reset code here since the player-reset depends // on spawnpoint entities which have to be reset first --blub - if (dorespawn) + if (!MUTATOR_CALLHOOK(reset_map_players)) { - if (!MUTATOR_CALLHOOK(reset_map_players)) + FOREACH_CLIENT(IS_PLAYER(it), { - FOREACH_CLIENT(IS_PLAYER(it), - { - // PlayerScore_Clear(it); - CS(it).killcount = 0; - // stop the player from moving so that they stand still once they get respawned - it.velocity = '0 0 0'; - it.avelocity = '0 0 0'; - CS(it).movement = '0 0 0'; - PutClientInServer(it); - }); - } + // PlayerScore_Clear(it); + CS(it).killcount = 0; + // stop the player from moving so that they stand still once they get respawned + it.velocity = '0 0 0'; + it.avelocity = '0 0 0'; + CS(it).movement = '0 0 0'; + PutClientInServer(it); + }); } } @@ -418,7 +415,7 @@ void reset_map(bool dorespawn, bool is_fake_round_start) void ReadyRestart_think(entity this) { if (!warmup_stage) // if the countdown was not aborted - reset_map(true, false); + reset_map(false); delete(this); } @@ -478,7 +475,7 @@ void ReadyRestart_force(bool is_fake_round_start) } if (!sv_ready_restart_after_countdown || warmup_stage) - reset_map(true, is_fake_round_start); + reset_map(is_fake_round_start); if (autocvar_sv_eventlog) GameLogEcho(":restart"); } diff --git a/qcsrc/server/command/vote.qh b/qcsrc/server/command/vote.qh index 184e502e5..3e8aaa33f 100644 --- a/qcsrc/server/command/vote.qh +++ b/qcsrc/server/command/vote.qh @@ -67,7 +67,7 @@ int readycount; // amount of players who are ready .int team_saved; // team number to restore upon map reset .void(entity this) reset; // if set, an entity is reset using this .void(entity this) reset2; // if set, an entity is reset using this (after calling ALL the reset functions for other entities) -void reset_map(float dorespawn, bool is_fake_round_start); +void reset_map(bool is_fake_round_start); void ReadyCount(); void ReadyRestart_force(bool is_fake_round_start); void VoteCount(float first_count); diff --git a/qcsrc/server/round_handler.qc b/qcsrc/server/round_handler.qc index 6c9342b80..b22ba178d 100644 --- a/qcsrc/server/round_handler.qc +++ b/qcsrc/server/round_handler.qc @@ -28,7 +28,7 @@ void round_handler_Think(entity this) this.wait = false; this.cnt = this.count + 1; // init countdown round_starttime = time + this.count; - reset_map(true, false); + reset_map(false); } if (this.cnt > 0) // countdown running -- 2.39.2