"Tyre Laps" amount is negative in Weekend mode
ZerdNerd opened this issue · 1 comments
As per title.
In races on distance of ca. 160 km, full race weekends, the "tyre laps" amount in debug window is in negatives. From what I saw it goes into positive ones when race is halfway through.
While it might not be a bug that is in any way impacting the gameplay - as for now it's only visible in debug - it can be a problem in the future should RARE have ie a window showing how old are the tyres together with % of their usage.
(disregard the double M, it's my fault in filling the config in wrong way)
I think it's because in function:
local function getTyreLapCount(driver)
return (driver.car.isInPitlane and not driver.hasPitted) and driver.tyreLaps
or (driver.car.lapCount - driver.lapPitted)
end
variable:
self.lapsCompleted = self.car.lapCount // Number of completed laps in this session, including spoiled laps
is cleared after each session, while variable:
self.lapPitted = 0
is not.