]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/round_handler.qc
Using a separate global to keep track of overtime phase
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / round_handler.qc
index 93c3835271a049b796eaab6a2ff4911ebfe7b6fd..b63883dcc828e4b932a984d6bd8d959455610100 100644 (file)
@@ -28,7 +28,7 @@ void round_handler_Think(entity this)
                this.wait = false;
                this.cnt = this.count + 1;  // init countdown
                round_starttime = time + this.count;
-               reset_map(true);
+               reset_map(true, false);
        }
 
        if (this.cnt > 0)  // countdown running
@@ -50,6 +50,7 @@ void round_handler_Think(entity this)
                else
                {
                        round_handler_Reset(0);
+                       round_starttime = -1; // can't start
                }
                this.nextthink = time + 1;  // canRoundStart every second
        }
@@ -75,6 +76,7 @@ void round_handler_Init(float the_delay, float the_count, float the_round_timeli
        this.count = fabs(floor(the_count));
        this.cnt = this.count + 1;
        this.round_timelimit = (the_round_timelimit > 0) ? the_round_timelimit : 0;
+       round_limit = the_round_timelimit;
 }
 
 // NOTE: this is only needed because if round_handler spawns at time 1
@@ -111,7 +113,8 @@ void round_handler_Reset(float next_think)
        if (this.count)
                if (this.cnt < this.count + 1) this.cnt = this.count + 1;
        this.nextthink = next_think;
-       round_starttime = (next_think) ? (next_think + this.count) : -1;
+       if (next_think)
+               round_starttime = next_think + this.count;
 }
 
 void round_handler_Remove()