File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
Source/Orts.Simulation/Simulation Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -348,7 +348,7 @@ public TRAIN_CONTROL ControlMode
348
348
/// <summary>
349
349
/// Set when the train is out of control
350
350
/// </summary>
351
- private TRAIN_CONTROL ControlModeBeforeOutOfControl = TRAIN_CONTROL.UNDEFINED;
351
+ public TRAIN_CONTROL ControlModeBeforeOutOfControl = TRAIN_CONTROL.UNDEFINED;
352
352
353
353
public enum OUTOFCONTROL
354
354
{
Original file line number Diff line number Diff line change @@ -539,7 +539,15 @@ public void Initialize()
539
539
CustomizedCabviewControlNames [ id ] = value ;
540
540
}
541
541
} ;
542
- Script . RequestToggleManualMode = ( ) => Locomotive . Train . RequestToggleManualMode ( ) ;
542
+ Script . RequestToggleManualMode = ( ) =>
543
+ {
544
+ if ( Locomotive . Train . ControlMode == Train . TRAIN_CONTROL . OUT_OF_CONTROL && Locomotive . Train . ControlModeBeforeOutOfControl == Train . TRAIN_CONTROL . EXPLORER )
545
+ {
546
+ Trace . TraceWarning ( "RequestToggleManualMode() is deprecated for explorer mode. Please use ResetOutOfControlMode() instead" ) ;
547
+ Locomotive . Train . ManualResetOutOfControlMode ( ) ;
548
+ }
549
+ else Locomotive . Train . RequestToggleManualMode ( ) ;
550
+ } ;
543
551
Script . ResetOutOfControlMode = ( ) => Locomotive . Train . ManualResetOutOfControlMode ( ) ;
544
552
545
553
// TrainControlSystem INI configuration file
You can’t perform that action at this time.
0 commit comments