Skip to content

Commit ca9f457

Browse files
committed
Bug fix for https://bugs.launchpad.net/or/+bug/2091895 Train disappears from train list window
1 parent 3fb566e commit ca9f457

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Source/Orts.Simulation/Simulation/Simulator.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1955,14 +1955,14 @@ private void StartSwitchPlayerTrain()
19551955
TrainSwitcher.ClickedSelectedAsPlayer = false;
19561956
return;
19571957
}
1958-
if (playerTrain.TrainType == Train.TRAINTYPE.AI_PLAYERDRIVEN || !playerTrain.Autopilot)
1958+
if (playerTrain.TrainType == Train.TRAINTYPE.AI_PLAYERDRIVEN || TimetableMode && !playerTrain.Autopilot)
19591959
{
19601960
// it must be autopiloted first
19611961
playerTrain.SwitchToAutopilotControl();
19621962
}
19631963
// and now switch!
19641964
playerTrain.TrainType = Train.TRAINTYPE.AI;
1965-
playerTrain.Autopilot = false;
1965+
if (!TimetableMode) AI.AITrains.Add(playerTrain);
19661966
if (TrainSwitcher.SuspendOldPlayer)
19671967
{
19681968
playerTrain.MovementState = AITrain.AI_MOVEMENT_STATE.SUSPENDED;

0 commit comments

Comments
 (0)