Skip to content

Commit a28da45

Browse files
committed
Remove seemingly redundant calls to raise pantograph
1 parent 7bce293 commit a28da45

File tree

1 file changed

+2
-9
lines changed
  • Source/Orts.Simulation/Simulation/AIs

1 file changed

+2
-9
lines changed

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

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -926,18 +926,11 @@ public AITrain CreateAITrainDetail(Service_Definition sd, Traffic_Service_Defini
926926
mstsSteamLocomotive.TenderCoalMassKG = mstsSteamLocomotive.MaxTenderCoalMassKG * Simulator.Activity.Tr_Activity.Tr_Activity_Header.FuelCoal / 100.0f;
927927
}
928928

929-
if (train.InitialSpeed != 0)
930-
{
931-
car.SignalEvent(PowerSupplyEvent.RaisePantograph, 1);
932-
933-
if (car is MSTSLocomotive loco)
934-
loco.SetPower(true);
935-
}
929+
if (train.InitialSpeed != 0 && car is MSTSLocomotive loco)
930+
loco.SetPower(true);
936931
}
937932
else
938933
{
939-
car.SignalEvent(PowerSupplyEvent.RaisePantograph, 1);
940-
941934
if (car is MSTSLocomotive loco)
942935
loco.SetPower(true);
943936

0 commit comments

Comments
 (0)