Skip to content

Commit a3bc9e7

Browse files
committed
Modify code as required by reviewer
1 parent 0d3e70b commit a3bc9e7

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed

Source/Orts.Simulation/Simulation/Simulator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1601,7 +1601,7 @@ private void RestoreTrains(BinaryReader inf)
16011601
// find player train
16021602
foreach (Train thisTrain in Trains)
16031603
{
1604-
if (thisTrain.TrainType == Train.TRAINTYPE.PLAYER || thisTrain is TTTrain && thisTrain == Trains[0]
1604+
if (thisTrain.TrainType == Train.TRAINTYPE.PLAYER || (thisTrain is TTTrain && thisTrain == Trains[0])
16051605
|| thisTrain.TrainType == Train.TRAINTYPE.AI_PLAYERDRIVEN || thisTrain.TrainType == Train.TRAINTYPE.AI_PLAYERHOSTING)
16061606
{
16071607
TrainDictionary.Add(thisTrain.Number, thisTrain);

Source/Orts.Simulation/Simulation/Timetables/TTTrain.cs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2388,7 +2388,7 @@ public bool StartFromAITrain(TTTrain otherTrain, int presentTime, TrackCircuitSe
23882388
LeadLocomotiveIndex = otherTrain.LeadLocomotiveIndex;
23892389

23902390
// Copy other train speed if not restricted for either train
2391-
if (!otherTrain.SpeedSettings.restrictedSet && !SpeedSettings.restrictedSet || TrainMaxSpeedMpS == 0)
2391+
if ((!otherTrain.SpeedSettings.restrictedSet && !SpeedSettings.restrictedSet) || TrainMaxSpeedMpS == 0)
23922392
{
23932393
TrainMaxSpeedMpS = otherTrain.TrainMaxSpeedMpS;
23942394
}
@@ -4060,16 +4060,6 @@ public override void UpdateStationState(float elapsedClockSeconds, int presentTi
40604060
ResetActions(true);
40614061
}
40624062

4063-
//================================================================================================//
4064-
/// <summary>
4065-
/// If autopiloted, generate strings for NextStationWindow
4066-
/// Override for AITrain class
4067-
/// <\summary>
4068-
public void PopulateNextStationWindow()
4069-
{
4070-
}
4071-
4072-
40734063
//================================================================================================//
40744064
/// <summary>
40754065
/// Update for train in Braking state
@@ -13520,7 +13510,6 @@ public bool PerformDetach(TTTrain train, bool allowPlayerSelect)
1352013510
Trace.TraceInformation("Train {0} : detach to train {1} : cannot find new train \n", train.Name, DetachFormedTrainName);
1352113511
}
1352213512

13523-
// newTrain.Autopilot = train.Autopilot;
1352413513
train.DetachUnits = iunits;
1352513514
train.DetachPosition = frontpos;
1352613515

0 commit comments

Comments
 (0)