Skip to content

Commit ec44b47

Browse files
committed
Handle case without lead locomotive
1 parent da10def commit ec44b47

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)