Merge branch 'terencehill/gameover_stuff' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / command / vote.qc
index ebef7e1375d3ddc6a68b37f5a0f91758702e8624..44b8acb8e7a8ff5fb9ea7e18688e269b3bd66be9 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();