Skip to content

Commit a877d5a

Browse files
committed
Correct review suggestions and manual update
1 parent 1a49cc4 commit a877d5a

File tree

4 files changed

+20
-7
lines changed

4 files changed

+20
-7
lines changed

Source/Documentation/Manual/sound.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ ORTS
433433
^^^^
434434

435435
The sound objects attached to a vehicle (wagon or loco) can respond in volume and frequency to changes in the vehicle's properties.
436-
There are 7 properties:
436+
There are a number of triggers as follows:
437437

438438
- distance squared from a sound source (m\ :sup:`2`)
439439

@@ -445,9 +445,11 @@ There are 7 properties:
445445

446446
- 3 variables in range 0 - 1:
447447

448-
- Variable1 reflects the throttle
448+
- Variable1 reflects the throttle. For steam locomotives it is possible to have multiple steam engines, thus this variable can be applied
449+
to each engine, by using a sound trigger of the form ``Variable1_x_inc_past`` or ``Variable1_x_dec_past``, where x = steam engine number.
449450

450-
- Variable2 reflects the engine's RPM (diesel) or Tractive Force (electric) or cylinder pressure (steam)
451+
- Variable2 reflects the engine's RPM (diesel) or Tractive Force (electric) or cylinder pressure (steam). Where a Booster Engine is fitted,
452+
then ``Variable2BoosterControlled`` can be used to control cylinder pressure for booster engines on steam locomotives.
451453

452454
- Variable3 reflects the dynamic brake (diesel | electric) or fuel rate (steam)
453455

Source/Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2456,7 +2456,7 @@ protected virtual void UpdateAxleDriveForce()
24562456
/// <summary>
24572457
/// This function applies a sign to the motive force as a function of the direction of the train.
24582458
/// </summary>
2459-
protected virtual void ApplyDirectionToTractiveForce(ref float tractiveForceN, int numberofengine )
2459+
protected virtual void ApplyDirectionToTractiveForce(ref float tractiveForceN, int numberofengine = 0 )
24602460
{
24612461
if (Train.IsPlayerDriven)
24622462
{

Source/Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -844,6 +844,17 @@ private bool ZeroError(float val1, float val2, string name)
844844
return true;
845845
}
846846

847+
private bool ZeroError(float val1, string name)
848+
{
849+
if (val1 > 0)
850+
return false;
851+
if (Simulator.Settings.VerboseConfigurationMessages)
852+
{
853+
Trace.TraceWarning("Steam engine value {1} must be defined and greater than zero in {0}", WagFilePath, name);
854+
}
855+
return true;
856+
}
857+
847858
/// <summary>
848859
/// Parse the wag file parameters required for the simulator and viewer classes
849860
/// </summary>
@@ -1191,9 +1202,9 @@ public override void Initialize()
11911202
MSTSCylinderStrokeM = 1;
11921203
if (ZeroError(DriverWheelRadiusM, SteamEngines[0].AttachedAxle.WheelRadiusM, "MSTSWheelRadius"))
11931204
DriverWheelRadiusM = Me.FromIn(30.0f); // Wheel radius of loco drive wheels can be anywhere from about 10" to 40"
1194-
if (ZeroError(MaxBoilerPressurePSI, 1, "MaxBoilerPressure"))
1205+
if (ZeroError(MaxBoilerPressurePSI, "MaxBoilerPressure"))
11951206
MaxBoilerPressurePSI = 1;
1196-
if (ZeroError(BoilerVolumeFT3, 1, "BoilerVolume"))
1207+
if (ZeroError(BoilerVolumeFT3, "BoilerVolume"))
11971208
BoilerVolumeFT3 = 1;
11981209

11991210
// For light locomotives reduce the weight of the various connecting rods, as the default values are for larger locomotives. This will reduce slip on small locomotives

Source/RunActivity/Viewer3D/Popups/HUDWindow.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ void TextPageConsistInfo(TableData table)
585585
}
586586

587587
/// <summary>
588-
/// Calculates Whyte noatation for the vehicle
588+
/// Calculates Whyte notation for the vehicle
589589
/// For duplex steam locomotives wheel axles can be grouped under the main object shape, and hence the multiple engines will be counted as a single grouping.
590590
/// For multiple engines, the number of wheels defined in the attached axles will be used to determine the axles in the "non-bogie" groupings.
591591
/// </summary>

0 commit comments

Comments
 (0)