From: z411 Date: Fri, 2 Apr 2021 22:01:10 +0000 (-0300) Subject: Fixed round countdown while on timeout X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=9e8b322445fec066a3fe7cda2bad10b86e42eaf9;p=xonotic%2Fxonotic-data.pk3dir.git Fixed round countdown while on timeout --- 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;