X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fcommand%2Fvote.qc;h=b91a8f4df3e208633e21e0d7ee40ef12fcddffc1;hb=ad1fc0314153e3f183fc36892aa86126fa269c5e;hp=d1cdb7e59db5a2c766aeb76ef907c7a5a198f64b;hpb=b0a563c3658ec620ddb9037b9417b743a47002a5;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/command/vote.qc b/qcsrc/server/command/vote.qc index d1cdb7e59..b91a8f4df 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(); @@ -455,8 +464,7 @@ void ReadyRestart_force() void ReadyRestart() { - // no assault support yet... - if (g_assault | gameover | intermission_running | race_completing) localcmd("restart\n"); + if (MUTATOR_CALLHOOK(ReadyRestart_Deny) || gameover || race_completing) localcmd("restart\n"); else localcmd("\nsv_hook_gamerestart\n"); // Reset ALL scores, but only do that at the beginning of the countdown if sv_ready_restart_after_countdown is off!