From: terencehill Date: Thu, 17 Nov 2016 21:17:00 +0000 (+0100) Subject: Don't try to reset map and players if game ended during countdown to game start X-Git-Tag: xonotic-v0.8.2~432 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f26e7ecfa29357afd79cc3d630648df9d9d5dbe8;p=xonotic%2Fxonotic-data.pk3dir.git Don't try to reset map and players if game ended during countdown to game start --- 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();