From f26e7ecfa29357afd79cc3d630648df9d9d5dbe8 Mon Sep 17 00:00:00 2001 From: terencehill Date: Thu, 17 Nov 2016 22:17:00 +0100 Subject: [PATCH] Don't try to reset map and players if game ended during countdown to game start --- qcsrc/server/command/vote.qc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/qcsrc/server/command/vote.qc b/qcsrc/server/command/vote.qc index d1cdb7e59..85c5d1847 100644 --- a/qcsrc/server/command/vote.qc +++ b/qcsrc/server/command/vote.qc @@ -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(); -- 2.39.2