]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix timer timeout and lead announcing
authorz411 <z411@omaera.org>
Sat, 23 Apr 2022 21:19:13 +0000 (17:19 -0400)
committerz411 <z411@omaera.org>
Sat, 23 Apr 2022 21:19:13 +0000 (17:19 -0400)
qcsrc/client/hud/panel/timer.qc
qcsrc/server/world.qc

index 193a3ca9054e258b36a44414146fbd634309b4f1..c0a3ece2423516c832f5ee3cd4d2337cb5ef43b8 100644 (file)
@@ -145,7 +145,13 @@ void HUD_Timer()
                        // Use real or frozen time and get the time limit
                        round_endtime = STAT(ROUNDENDTIME);
                        round_timelimit = STAT(ROUND_TIMELIMIT);
-                       round_curtime = (round_endtime ? round_endtime : time);
+
+                       if(round_endtime)
+                               round_curtime = round_endtime;
+                       else if(timeout_last)
+                               round_curtime = timeout_last;
+                       else
+                               round_curtime = time;
 
                        // Calculate time left
                        round_timeleft = HUD_Timer_TimeLeft(round_curtime, STAT(ROUNDSTARTTIME), round_timelimit);
index 101fc633a84c01ddaf1f4fb99e5765677fba912e..f0e98b657c9b67172088fa1deef8a71ac3605912 100644 (file)
@@ -1523,6 +1523,9 @@ void ClearWinners()
 
 void AnnounceNewLeader()
 {
+       // Don't announce if in warmup or just started
+       if(warmup_stage || time - game_starttime < 1) return;
+
        if(teamplay) {
                if (WinningConditionHelper_equality)
                        Send_Notification(NOTIF_ALL, NULL, MSG_ANNCE, ANNCE_TEAM_LEADS_TIED);