X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fcommand%2Fvote.qc;h=b91a8f4df3e208633e21e0d7ee40ef12fcddffc1;hb=ad1fc0314153e3f183fc36892aa86126fa269c5e;hp=72bedd982ca79797397b9d811b8362752a9b2b95;hpb=9185b58da6fe5f2b095d7066577e1e024b4d2798;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/command/vote.qc b/qcsrc/server/command/vote.qc index 72bedd982..b91a8f4df 100644 --- a/qcsrc/server/command/vote.qc +++ b/qcsrc/server/command/vote.qc @@ -1,5 +1,5 @@ #include "vote.qh" -#include +#include #include "vote.qh" #include "common.qh" @@ -10,9 +10,10 @@ #include "../round_handler.qh" #include "../scores.qh" -#include "../mutators/all.qh" +#include "../mutators/_mod.qh" #include +#include #include #include #include @@ -333,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); @@ -398,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(); @@ -454,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!