Skip to content

Commit 6ca89da

Browse files

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Source/Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5389,15 +5389,14 @@ public virtual float GetDataOf(CabViewControl cvc)
53895389

53905390
case CABViewControlTypes.THROTTLE:
53915391
{
5392-
if (CruiseControl.SkipThrottleDisplay) break;
5392+
if (CruiseControl != null && CruiseControl.SkipThrottleDisplay) break;
53935393
data = GetThrottleHandleValue(Train.TrainType == Train.TRAINTYPE.AI_PLAYERHOSTING ? ThrottlePercent / 100f : LocalThrottlePercent / 100f);
53945394
break;
53955395
}
53965396
case CABViewControlTypes.THROTTLE_DISPLAY:
53975397
case CABViewControlTypes.CPH_DISPLAY:
53985398
{
5399-
if (CruiseControl != null)
5400-
if (CruiseControl.SkipThrottleDisplay) break;
5399+
if (CruiseControl != null && CruiseControl.SkipThrottleDisplay) break;
54015400
data = Train.TrainType == Train.TRAINTYPE.AI_PLAYERHOSTING? ThrottlePercent / 100f : LocalThrottlePercent / 100f;
54025401
break;
54035402
}

0 commit comments

Comments
 (0)