We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 84cb7cb commit abe2e52Copy full SHA for abe2e52
Source/Orts.Simulation/Simulation/AIs/AI.cs
@@ -1319,7 +1319,7 @@ private void AddTTTrains()
1319
Simulator.NameDictionary.Add(train.Name.ToLower(), train);
1320
if (train.TrainType == Train.TRAINTYPE.PLAYER || train.TrainType == Train.TRAINTYPE.INTENDED_PLAYER)
1321
{
1322
- if (AITrains[0].TrainType == Train.TRAINTYPE.PLAYER)
+ if (AITrains.Count > 0 && AITrains[0].TrainType == Train.TRAINTYPE.PLAYER)
1323
AITrains.RemoveAt(0);
1324
AITrains.Insert(0, train);
1325
}
0 commit comments