File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Source/Orts.Simulation/Simulation/RollingStocks Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -2650,9 +2650,9 @@ protected virtual void UpdateCompressor(float elapsedClockSeconds)
26502650 if ( MainResPressurePSI < CompressorRestartPressurePSI && LocomotivePowerSupply . AuxiliaryPowerSupplyState == PowerSupplyState . PowerOn && ! CompressorIsOn )
26512651 {
26522652 SignalEvent ( Event . CompressorOn ) ;
2653- foreach ( var loco in Train . Cars . OfType < MSTSLocomotive > ( ) )
2653+ foreach ( var car in Train . Cars )
26542654 {
2655- if ( loco . RemoteControlGroup == 0 && loco . LocomotivePowerSupply . AuxiliaryPowerSupplyOn && ! loco . CompressorIsOn && loco . CompressorIsMUControlled )
2655+ if ( car is MSTSLocomotive loco && loco . RemoteControlGroup == 0 && loco . LocomotivePowerSupply . AuxiliaryPowerSupplyOn && ! loco . CompressorIsOn && loco . CompressorIsMUControlled )
26562656 {
26572657 loco . SignalEvent ( Event . CompressorOn ) ;
26582658 }
You can’t perform that action at this time.
0 commit comments