Timers fix?
This commit is contained in:
parent
8a426a1d5c
commit
ef583d79f0
@ -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)
|
||||
|
||||
@ -75,4 +75,3 @@ local ecu = ECU:new({
|
||||
Clutch = clutch
|
||||
-- Gearbox = gearbox
|
||||
})
|
||||
-- printTable(config)
|
||||
|
||||
@ -7,7 +7,7 @@ Axles = {
|
||||
},
|
||||
Throttle = {
|
||||
Positive = KEY.W,
|
||||
Gravity = 0.1,
|
||||
Gravity = 0.15,
|
||||
Sensitivity = 0.2
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user