Skip to content

Commit 54d55cf

Browse files
authored
Merge pull request #1014 from Csantucci/fix-train-disappearing
Bug fix for https://bugs.launchpad.net/or/+bug/2091895 Train disappears from train list window
2 parents 3fb566e + 3dbe81f commit 54d55cf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Source/Orts.Simulation/Simulation/Simulator.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1955,13 +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+
if (!TimetableMode) AI.AITrains.Add(playerTrain);
19651966
playerTrain.Autopilot = false;
19661967
if (TrainSwitcher.SuspendOldPlayer)
19671968
{

0 commit comments

Comments
 (0)