We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9004544 + 04a55b3 commit 30f8b09Copy full SHA for 30f8b09
1 file changed
scripts/specializations/CpVehicleSettings.lua
@@ -487,8 +487,11 @@ end
487
---@return table texts
488
---@return any correct current value after max speed adjustment
489
function CpVehicleSettings:generateSpeedSettingValuesAndTexts(setting, lastValue)
490
- local maxSpeed = self.getCruiseControlMaxSpeed and self:getCruiseControlMaxSpeed()
491
- maxSpeed = maxSpeed or setting.data.max
+ local maxSpeed = setting.data.max
+ local cruiseControl = self.spec_drivable and self.spec_drivable.cruiseControl
492
+ if cruiseControl then
493
+ maxSpeed = math.max(cruiseControl.maxSpeed, cruiseControl.maxSpeedReverse)
494
+ end
495
local values, texts = {}, {}
496
for i = setting.data.min, maxSpeed, setting.data.incremental or 1 do
497
table.insert(values, i)
0 commit comments