From: z411 Date: Fri, 11 Mar 2022 03:34:54 +0000 (-0300) Subject: Fix redundant conditional X-Git-Tag: xonotic-v0.8.5~128^2~21 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=10e58c66fd7efa8a587e477490d2b742b3ecb921;p=xonotic%2Fxonotic-data.pk3dir.git Fix redundant conditional --- diff --git a/qcsrc/client/announcer.qc b/qcsrc/client/announcer.qc index 60bcae23e..0635ea5fc 100644 --- a/qcsrc/client/announcer.qc +++ b/qcsrc/client/announcer.qc @@ -76,7 +76,7 @@ void Announcer_Countdown(entity this) * timelimit, fraglimit and game_starttime! Requires engine changes (remove STAT_TIMELIMIT * and STAT_FRAGLIMIT to be auto-sent) */ - float previous_game_starttime; +float previous_game_starttime; void Announcer_Gamestart() { float startTime = STAT(GAMESTARTTIME); @@ -107,13 +107,12 @@ void Announcer_Gamestart() setthink(announcer_countdown, Announcer_Countdown); } - // Set centerprint title - if(time < STAT(GAMESTARTTIME) && !warmup_stage) - centerprint_SetTitle(MapInfo_Type_ToText(gametype)); - - if(time + 5.0 < startTime) // if connecting to server while restart was active don't always play prepareforbattle if(!warmup_stage && time < STAT(GAMESTARTTIME)) - Local_Notification(MSG_ANNCE, ANNCE_PREPARE); + { + centerprint_SetTitle(MapInfo_Type_ToText(gametype)); // Set centerprint title + if(time + 5.0 < startTime) // if connecting to server while restart was active don't always play prepareforbattle + Local_Notification(MSG_ANNCE, ANNCE_PREPARE); + } announcer_countdown.nextthink = startTime - floor(startTime - time + 0.5); //synchronize nextthink to startTime }