File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
Source/Orts.Simulation/Simulation/RollingStocks Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -5389,15 +5389,14 @@ public virtual float GetDataOf(CabViewControl cvc)
5389
5389
5390
5390
case CABViewControlTypes . THROTTLE :
5391
5391
{
5392
- if ( CruiseControl . SkipThrottleDisplay ) break ;
5392
+ if ( CruiseControl != null && CruiseControl . SkipThrottleDisplay ) break ;
5393
5393
data = GetThrottleHandleValue ( Train . TrainType == Train . TRAINTYPE . AI_PLAYERHOSTING ? ThrottlePercent / 100f : LocalThrottlePercent / 100f ) ;
5394
5394
break ;
5395
5395
}
5396
5396
case CABViewControlTypes . THROTTLE_DISPLAY :
5397
5397
case CABViewControlTypes . CPH_DISPLAY :
5398
5398
{
5399
- if ( CruiseControl != null )
5400
- if ( CruiseControl . SkipThrottleDisplay ) break ;
5399
+ if ( CruiseControl != null && CruiseControl . SkipThrottleDisplay ) break ;
5401
5400
data = Train . TrainType == Train . TRAINTYPE . AI_PLAYERHOSTING ? ThrottlePercent / 100f : LocalThrottlePercent / 100f ;
5402
5401
break ;
5403
5402
}
You can’t perform that action at this time.
0 commit comments