]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/announcer.qc
Support multi-stage warmups in Announcer_Time()
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / announcer.qc
index e15bc23b7e23c62251f9af84547d070bb3accc5a..077a1c6d012ecb97f68f95fc15f00cad0d06ff9a 100644 (file)
@@ -78,7 +78,7 @@ void Announcer_Countdown(entity this)
        if(countdown <= 0) // countdown has finished, starttime is now
        {
                Local_Notification(MSG_CENTER, CENTER_COUNTDOWN_BEGIN);
-               Local_Notification(MSG_MULTI, MULTI_COUNTDOWN_BEGIN);
+               Local_Notification(MSG_MULTI, COUNTDOWN_BEGIN);
                delete(this);
                announcer_countdown = NULL;
                Announcer_ClearTitle();
@@ -130,7 +130,7 @@ void Announcer_Gamestart()
        float roundstarttime = STAT(ROUNDSTARTTIME);
        if(roundstarttime > startTime)
                startTime = roundstarttime;
-       if(intermission)
+       if(intermission || warmup_stage)
        {
                Announcer_ClearTitle();
                if(announcer_countdown)
@@ -214,7 +214,7 @@ void Announcer_Time()
        {
                float warmup_timelimit = STAT(WARMUP_TIMELIMIT);
                if(warmup_timelimit > 0)
-                       timeleft = max(0, warmup_timelimit - time);
+                       timeleft = max(0, warmup_timelimit + starttime - time);
                else
                        timeleft = 0;
        }