Skip to content

Commit c2b1963

Browse files
committed
Fix for custom smooth selectors
1 parent 35f0051 commit c2b1963

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/CruiseControl.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1198,7 +1198,7 @@ public void SpeedSelectorIncreaseStep()
11981198
if (time >= selectedSpeedLeverHoldTime && time < selectedSpeedLeverHoldTime + SpeedSelectorStepTimeSeconds) return;
11991199
selectedSpeedLeverHoldTime = time;
12001200

1201-
if (SpeedSelectorIsDiscrete)
1201+
if (SpeedSelectorController.NotchCount() > 0)
12021202
{
12031203
SpeedSelectorController.StartIncrease();
12041204
SpeedSelectorController.StopIncrease();
@@ -1222,7 +1222,7 @@ public void SpeedSelectorDecreaseStep()
12221222
selectedSpeedLeverHoldTime = time;
12231223

12241224
float speed = ControllerValueToSelectedSpeedMpS(SpeedSelectorController.CurrentValue) - SpeedRegulatorNominalSpeedStepMpS;
1225-
if (SpeedSelectorIsDiscrete)
1225+
if (SpeedSelectorController.NotchCount() > 0)
12261226
{
12271227
SpeedSelectorController.StartDecrease();
12281228
SpeedSelectorController.StopDecrease();

0 commit comments

Comments
 (0)