]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Don't even try to count the time on personal timer if it's not set
authorMario <mario@smbclan.net>
Sun, 16 Jul 2017 16:55:00 +0000 (02:55 +1000)
committerMario <mario@smbclan.net>
Sun, 16 Jul 2017 16:55:00 +0000 (02:55 +1000)
qcsrc/client/hud/panel/racetimer.qc

index c091fa712c46e26e1e7e172de4ca4909e7c4714a..b6f3fb58f40c4c869c95c11f9515b604a2c013e0 100644 (file)
@@ -176,7 +176,7 @@ void HUD_RaceTimer ()
                                if(race_nextbesttime)
                                {
                                        a = bound(0, 2 - ((race_laptime + TIME_DECODE(race_nextbesttime)) - (time + TIME_DECODE(race_penaltyaccumulator))), 1);
-                                       float a2 = bound(0, 2 - ((race_laptime + TIME_DECODE(race_mybesttime)) - (time + TIME_DECODE(race_penaltyaccumulator))), 1);
+                                       float a2 = ((race_mybesttime) ? bound(0, 2 - ((race_laptime + TIME_DECODE(race_mybesttime)) - (time + TIME_DECODE(race_penaltyaccumulator))), 1) : 0);
                                        if(a > 0) // next one?
                                                s = MakeRaceString(race_nextcheckpoint, (time + TIME_DECODE(race_penaltyaccumulator)) - race_laptime, TIME_DECODE(race_nextbesttime), ((a2 > 0) ? TIME_DECODE(race_mybesttime) : 0), 0, race_nextbestname);
                                }