]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/round_handler.qc
Merge branch 'master' into Juhu/strafehud
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / round_handler.qc
index 8cc3295b9a5d4acfe8d59a7f77585e115a30ccf3..fa970f955e0d9fddf7f4af0b11c92dc46bd7047b 100644 (file)
@@ -1,24 +1,28 @@
 #include "round_handler.qh"
 
+#include <server/world.qh>
 #include "campaign.qh"
 #include "command/vote.qh"
+#include <common/mapobjects/triggers.qh>
 #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)
+       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;
@@ -74,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;
@@ -82,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)
        {