X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fround_handler.qc;h=fa970f955e0d9fddf7f4af0b11c92dc46bd7047b;hb=67610c5b92e218cc245c040209c1a79ab6b02758;hp=063c12abb0aa8f67dd25c600ab70512251194589;hpb=c1389c740a4a144e46543e51296ad90ade3c365b;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/round_handler.qc b/qcsrc/server/round_handler.qc index 063c12abb..fa970f955 100644 --- a/qcsrc/server/round_handler.qc +++ b/qcsrc/server/round_handler.qc @@ -1,27 +1,28 @@ #include "round_handler.qh" +#include #include "campaign.qh" #include "command/vote.qh" +#include #include "../common/util.qh" void round_handler_Think(entity this) { - if (time < game_starttime) + if (intermission_running) { - round_handler_Reset(game_starttime); + round_handler_Reset(0); + round_handler_Remove(); return; } - if (gameover) - gameover = false; - - if (intermission_running) + if (time < game_starttime) { - round_handler_Reset(0); - round_handler_Remove(); + round_handler_Reset(game_starttime); return; } + game_stopped = false; + if (this.wait) { this.wait = false; @@ -59,7 +60,6 @@ void round_handler_Think(entity this) // schedule a new round this.wait = true; this.nextthink = time + this.delay; - gameover = true; } else { @@ -78,7 +78,7 @@ void round_handler_Init(float the_delay, float the_count, float the_round_timeli } // NOTE: this is only needed because if round_handler spawns at time 1 -// gamestarttime isn't initialized yet +// game_starttime isn't initialized yet void round_handler_FirstThink(entity this) { round_starttime = max(time, game_starttime) + this.count; @@ -86,7 +86,7 @@ void round_handler_FirstThink(entity this) this.nextthink = max(time, game_starttime); } -void round_handler_Spawn(float() canRoundStart_func, float() canRoundEnd_func, void() roundStart_func) +void round_handler_Spawn(bool() canRoundStart_func, bool() canRoundEnd_func, void() roundStart_func) { if (round_handler) {