From 9e8b322445fec066a3fe7cda2bad10b86e42eaf9 Mon Sep 17 00:00:00 2001 From: z411 Date: Fri, 2 Apr 2021 19:01:10 -0300 Subject: [PATCH] Fixed round countdown while on timeout --- qcsrc/client/announcer.qc | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/qcsrc/client/announcer.qc b/qcsrc/client/announcer.qc index 28b5c1b1f..e5c18a559 100644 --- a/qcsrc/client/announcer.qc +++ b/qcsrc/client/announcer.qc @@ -26,19 +26,19 @@ void Announcer_Countdown(entity this) { float starttime = STAT(GAMESTARTTIME); float roundstarttime = STAT(ROUNDSTARTTIME); + float game_timeout = STAT(GAME_TIMEOUT); bool rounds; float countdown; - // z411 LOG_INFOF("time: %d - starttime: %d - roundstarttime: %d", time, starttime, roundstarttime); - - if(roundstarttime == -1) + if(roundstarttime == -1 || game_timeout) { Local_Notification(MSG_CENTER, CENTER_COUNTDOWN_ROUNDSTOP); delete(this); announcer_countdown = NULL; return; } + //if(roundstarttime >= starttime) // starttime = roundstarttime; if(starttime <= time && roundstarttime != starttime) // game start time has passed @@ -70,12 +70,10 @@ void Announcer_Countdown(entity this) // counting down to rounds if(rounds) { - if (timeout_status != TIMEOUT_ACTIVE) { - Local_Notification(MSG_CENTER, CENTER_COUNTDOWN_ROUNDSTART, countdown_rounded); - Notification annce_num = Announcer_PickNumber(CNT_ROUNDSTART, countdown_rounded); - if(annce_num != NULL) - Local_Notification(MSG_ANNCE, annce_num); - } + Local_Notification(MSG_CENTER, CENTER_COUNTDOWN_ROUNDSTART, countdown_rounded); + Notification annce_num = Announcer_PickNumber(CNT_ROUNDSTART, countdown_rounded); + if(annce_num != NULL) + Local_Notification(MSG_ANNCE, annce_num); this.nextthink = (roundstarttime - (countdown - 1)); } else @@ -129,8 +127,6 @@ void Announcer_Gamestart() // z411 set title if(time < STAT(GAMESTARTTIME) && !warmup_stage) { - //if(IS_GAMETYPE(DUEL)) { - //if(g_duel) { if(gametype == MAPINFO_TYPE_DUEL) { entity pl1 = players.sort_next; entity pl2 = pl1.sort_next; -- 2.39.2