Timers fix?

This commit is contained in:
Ivan Grachyov
2021-11-09 22:43:21 +05:00
parent 8a426a1d5c
commit ef583d79f0
3 changed files with 3 additions and 4 deletions

View File

@@ -55,9 +55,9 @@ function Engine:update()
if self.rpm > self.maxRPM then
self.throttle = 0
self._limiterTime = os.time()
self._limiterTime = timer.realtime()
else
self.throttle = os.time() >= self._limiterTime + self.limiterDuration and self.throttle or 0
self.throttle = timer.realtime() >= self._limiterTime + self.limiterDuration and self.throttle or 0
end
local masterThrottle = math.clamp(additionalEnergySupply + self.throttle, 0, 1)