]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix "prepare for battle" playing twice on round-based modes
authorz411 <z411@omaera.org>
Thu, 1 Jun 2023 03:43:34 +0000 (03:43 +0000)
committerbones_was_here <bones_was_here@xonotic.au>
Thu, 1 Jun 2023 03:43:34 +0000 (03:43 +0000)
qcsrc/client/announcer.qc

index 077a1c6d012ecb97f68f95fc15f00cad0d06ff9a..cc85f31ccab7b62ee8fc9bfadcb55e47db795b8f 100644 (file)
@@ -128,19 +128,16 @@ void Announcer_Gamestart()
 {
        float startTime = STAT(GAMESTARTTIME);
        float roundstarttime = STAT(ROUNDSTARTTIME);
-       if(roundstarttime > startTime)
+       if(time > startTime && roundstarttime > startTime)
                startTime = roundstarttime;
        if(intermission || warmup_stage)
        {
-               Announcer_ClearTitle();
                if(announcer_countdown)
                {
+                       Announcer_ClearTitle();
                        centerprint_Kill(ORDINAL(CPID_ROUND));
-                       if(announcer_countdown)
-                       {
-                               delete(announcer_countdown);
-                               announcer_countdown = NULL;
-                       }
+                       delete(announcer_countdown);
+                       announcer_countdown = NULL;
                }
                return;
        }
@@ -154,7 +151,7 @@ void Announcer_Gamestart()
                {
                        if (!announcer_countdown)
                        {
-                               announcer_countdown = new(announcer_countdown);
+                               announcer_countdown = new_pure(announcer_countdown);
                                setthink(announcer_countdown, Announcer_Countdown);
                        }