Skip to content

Commit 23d6192

Browse files
authored
Merge pull request #1146 from cesarBLG/ai-signal-event-fix
Fix for pantograph events not sent in AI trains
2 parents c7c80f1 + ec44b47 commit 23d6192

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Source/Orts.Simulation/Common/Scripting/PowerSupply/LocomotivePowerSupply.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ protected void SignalEventToOtherTrainVehicles(PowerSupplyEvent evt)
376376
/// </summary>
377377
protected void SignalEventToOtherTrainVehiclesWithId(PowerSupplyEvent evt, int id)
378378
{
379-
if (Locomotive == Train.LeadLocomotive)
379+
if (Locomotive == Train.LeadLocomotive || (Train.LeadLocomotive == null && IndexOfLocomotive() == 0))
380380
{
381381
foreach (TrainCar car in Train.Cars)
382382
{

0 commit comments

Comments
 (0)