From: Mario Date: Sun, 16 Jul 2017 16:55:00 +0000 (+1000) Subject: Don't even try to count the time on personal timer if it's not set X-Git-Tag: xonotic-v0.8.5~2594 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=91a68ae4be9c029caa90f6c42d1ee0965525bbb7;p=xonotic%2Fxonotic-data.pk3dir.git Don't even try to count the time on personal timer if it's not set --- diff --git a/qcsrc/client/hud/panel/racetimer.qc b/qcsrc/client/hud/panel/racetimer.qc index c091fa712..b6f3fb58f 100644 --- a/qcsrc/client/hud/panel/racetimer.qc +++ b/qcsrc/client/hud/panel/racetimer.qc @@ -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); }