Skip to content

Commit f2b6299

Browse files
committed
EOT: follow suggestions of reviewer
1 parent 80f6486 commit f2b6299

File tree

4 files changed

+1
-29
lines changed

4 files changed

+1
-29
lines changed

Source/Orts.Simulation/Common/Commands.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2242,10 +2242,7 @@ public ToggleEOTEmergencyBrakeCommand(CommandLog log)
22422242

22432243
public override void Redo()
22442244
{
2245-
if (Receiver?.Train?.EOT != null)
2246-
{
2247-
Receiver.Train.EOT.EmergencyBrake(!Receiver.Train.EOT.EOTEmergencyBrakingOn);
2248-
}
2245+
Receiver.Train.EOT?.EmergencyBrake(!Receiver.Train.EOT.EOTEmergencyBrakingOn);
22492246
}
22502247
}
22512248

Source/Orts.Simulation/Simulation/AIs/AI.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -834,8 +834,6 @@ private AITrain CreateAITrain(Service_Definition sd, Traffic_Traffic_Definition
834834
StartList.InsertTrain(train);
835835
Simulator.StartReference.Add(train.Number);
836836
}
837-
// if (train.Cars[0] is MSTSLocomotive && (train.Cars[0] as MSTSLocomotive).EOTEnabled != MSTSLocomotive.EOTenabled.no)
838-
// train.EOT = new EOT((train.Cars[0] as MSTSLocomotive).EOTEnabled, true, train);
839837
return train;
840838
}
841839

Source/Orts.Simulation/Simulation/Physics/Train.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -916,10 +916,6 @@ public Train(Simulator simulator, BinaryReader inf)
916916
InitialSpeed = inf.ReadSingle();
917917
IsPathless = inf.ReadBoolean();
918918

919-
/* var hasEOT = inf.ReadInt32();
920-
if (hasEOT == 1)
921-
EOT = new EOT(inf, this);*/
922-
923919
if (TrainType != TRAINTYPE.REMOTE)
924920
{
925921
// restore leadlocomotive

Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/EOT.cs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -91,25 +91,6 @@ public EOT(Simulator simulator, string wagPath)
9191
DelayTimer = new Timer(this);
9292
}
9393

94-
/* public EOT(MSTSLocomotive.EOTenabled eotEnabled, bool armed, Train train)
95-
{
96-
Train = train;
97-
EOTState = EOTstate.Disarmed;
98-
EOTType = eotEnabled;
99-
ID = IDRandom.Next(0, 99999);
100-
if (armed)
101-
EOTState = EOTstate.Armed;
102-
DelayTimer = new Timer(this);
103-
}*/
104-
105-
/* public EOT(BinaryReader inf, Train train)
106-
{
107-
Train = train;
108-
ID = inf.ReadInt32();
109-
EOTState = (EOTstate)(inf.ReadInt32());
110-
DelayTimer = new Timer(this);
111-
}*/
112-
11394
public override void Initialize()
11495
{
11596
base.Initialize();

0 commit comments

Comments
 (0)