Skip to content

Commit ade0195

Browse files
authored
Merge pull request #1065 from cesarBLG/pantograph-toggle
Fix for PantographToggle sound event
2 parents 8b2dd97 + 409064d commit ade0195

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

Source/Documentation/Manual/sound.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ Trigger Function
101101
44 SteamHeatChange
102102
45 Pantograph1Up
103103
46 Pantograph1Down
104-
47 Pantograph1Toggle
104+
47 PantographToggle
105105
48 VigilanceAlarmReset
106106
54 TrainBrakePressureDecrease
107107
56 VigilanceAlarmOn
@@ -698,4 +698,4 @@ the sound does not depend from that keyword.
698698
In the example shown, the sound is played if all conditions are met, that is season
699699
is spring or winter and weather is rain and time of day is within one of the two
700700
intervals 7-12 or 13-20. There may be as many TimeOfDay lines as wanted,
701-
but the granularity is one hour.
701+
but the granularity is one hour.

Source/Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs

-2
Original file line numberDiff line numberDiff line change
@@ -3608,7 +3608,6 @@ public override void SignalEvent(PowerSupplyEvent evt)
36083608
if (Pantographs != null)
36093609
{
36103610
Pantographs.HandleEvent(evt);
3611-
SignalEvent(Event.PantographToggle);
36123611
}
36133612
break;
36143613
}
@@ -3628,7 +3627,6 @@ public override void SignalEvent(PowerSupplyEvent evt, int id)
36283627
if (Pantographs != null)
36293628
{
36303629
Pantographs.HandleEvent(evt, id);
3631-
SignalEvent(Event.PantographToggle);
36323630
}
36333631
break;
36343632
}

Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/Pantograph.cs

+1
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,7 @@ public void HandleEvent(PowerSupplyEvent evt)
386386
foreach (var eventHandler in Wagon.EventHandlers)
387387
{
388388
eventHandler.HandleEvent(soundEvent);
389+
eventHandler.HandleEvent(Event.PantographToggle);
389390
}
390391
}
391392
catch (Exception error)

0 commit comments

Comments
 (0)