]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Don't try to reset map and players if game ended during countdown to game start
authorterencehill <piuntn@gmail.com>
Thu, 17 Nov 2016 21:17:00 +0000 (22:17 +0100)
committerterencehill <piuntn@gmail.com>
Thu, 17 Nov 2016 21:17:00 +0000 (22:17 +0100)
qcsrc/server/command/vote.qc

index d1cdb7e59db5a2c766aeb76ef907c7a5a198f64b..85c5d18472f82b08f94ff695c220ae2181761662 100644 (file)
@@ -334,7 +334,13 @@ void VoteThink()
 // Resets the state of all clients, items, weapons, waypoints, ... of the map.
 void reset_map(bool dorespawn)
 {
-       if (time <= game_starttime && round_handler_IsActive()) round_handler_Reset(game_starttime);
+       if (time <= game_starttime)
+       {
+               if (gameover)
+                       return;
+               if (round_handler_IsActive())
+                       round_handler_Reset(game_starttime);
+       }
 
        MUTATOR_CALLHOOK(reset_map_global);
 
@@ -399,6 +405,9 @@ void ReadyRestart_think(entity this)
 // Forces a restart of the game without actually reloading the map // this is a mess...
 void ReadyRestart_force()
 {
+       if (time <= game_starttime && gameover)
+               return;
+
        bprint("^1Server is restarting...\n");
 
        VoteReset();