Skip to content

Commit 9ca77b6

Browse files
committed
Add documentation in OR manual
1 parent 71e21a6 commit 9ca77b6

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

Source/Documentation/Manual/sound.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,20 @@ Trigger Function
430430
322 BoosterCylinderCocksClose
431431
========= =====================================
432432

433+
Following triggers referring to locomotive and train type are available:
434+
435+
========= =====================================
436+
Trigger Function
437+
========= =====================================
438+
330 AITrainLeadLoco
439+
331 AITrainHelperLoco
440+
332 PlayerTrainLeadLoco
441+
333 PlayerTrainHelperLoco
442+
334 AITrainApproachingStation
443+
335 AITrainLeavingStation
444+
========= =====================================
445+
446+
433447
Variable Triggers
434448
-----------------
435449

Source/RunActivity/Viewer3D/RollingStock/MSTSWagonViewer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1470,7 +1470,7 @@ protected void LoadCarSound(string wagonFolderSlash, string filename)
14701470
}
14711471
else if (MSTSWagon == Viewer.PlayerLocomotive)
14721472
MSTSWagon.SignalEvent(Event.PlayerTrainLeadLoco);
1473-
else if (MSTSWagon.Train != null && (MSTSWagon.Train.TrainType == Train.TRAINTYPE.PLAYER ||
1473+
else if (MSTSWagon is MSTSLocomotive && MSTSWagon.Train != null && (MSTSWagon.Train.TrainType == Train.TRAINTYPE.PLAYER ||
14741474
MSTSWagon.Train.TrainType == Train.TRAINTYPE.AI_PLAYERDRIVEN || MSTSWagon.Train.TrainType == Train.TRAINTYPE.AI_PLAYERHOSTING))
14751475
MSTSWagon.SignalEvent(Event.PlayerTrainHelperLoco);
14761476
}

0 commit comments

Comments
 (0)