]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Remove an unused parameter from reset_map
authorterencehill <piuntn@gmail.com>
Fri, 3 Mar 2023 11:06:59 +0000 (12:06 +0100)
committerterencehill <piuntn@gmail.com>
Fri, 3 Mar 2023 11:06:59 +0000 (12:06 +0100)
qcsrc/server/command/vote.qc
qcsrc/server/command/vote.qh
qcsrc/server/round_handler.qc

index a207b226b67a6a3259c049d0c15a948d96345f45..28fa7e7c056dae29e0675fce7c1eeb467fa4d469 100644 (file)
@@ -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");
 }
index 184e502e55e6287f783c0febbb0ed47c6f818e03..3e8aaa33f3b1e7f4dc50d822f579c72d452123fa 100644 (file)
@@ -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);
index 6c9342b80e30bcb64ec2759cc4a67c245d3bc95f..b22ba178d61d0c2ecbcb3f398a7868a25b595b0b 100644 (file)
@@ -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