From: z411 Date: Thu, 1 Jun 2023 03:43:34 +0000 (+0000) Subject: Fix "prepare for battle" playing twice on round-based modes X-Git-Tag: xonotic-v0.8.6~39^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ce23e0f7d306d3dfafbd2f3c4bad53cc65d3358c;p=xonotic%2Fxonotic-data.pk3dir.git Fix "prepare for battle" playing twice on round-based modes --- diff --git a/qcsrc/client/announcer.qc b/qcsrc/client/announcer.qc index 077a1c6d0..cc85f31cc 100644 --- a/qcsrc/client/announcer.qc +++ b/qcsrc/client/announcer.qc @@ -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); }