Skip to content

Commit a7d476e

Browse files
committed
Correct introduced bug.
1 parent 2cf8319 commit a7d476e

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

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

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2564,7 +2564,16 @@ private void UpdateFX(float elapsedClockSeconds)
25642564
if (CylinderAdvancedSteamEffects) // For advanced steam effects process each cylinder individually -
25652565
// - all ENG files will need to be changed.
25662566
{
2567-
var TotalNumberCyindersEng1 = SteamEngines[0].NumberCylinders + SteamEngines[0].LPNumberCylinders;
2567+
var TotalNumberCyindersEng1 = 0;
2568+
2569+
if (SteamEngineType == SteamEngineTypes.Compound)
2570+
{
2571+
TotalNumberCyindersEng1 = SteamEngines[0].NumberCylinders + SteamEngines[0].LPNumberCylinders;
2572+
}
2573+
else
2574+
{
2575+
TotalNumberCyindersEng1 = SteamEngines[0].NumberCylinders;
2576+
}
25682577

25692578
// Engine #1
25702579
// Find
@@ -5545,6 +5554,9 @@ private void UpdateCylinders(float elapsedClockSeconds, float throttle, float cu
55455554
// Geared locomotives will have to take into account gearing ratio.
55465555
RawCalculatedCylinderSteamUsageLBpS = SteamEngines[numberofengine].NumberCylinders * DrvWheelRevRpS * MotiveForceGearRatio * CylStrokesPerCycle * RawCylinderSteamWeightLbs;
55475556
CalculatedCylinderSteamUsageLBpS = RawCalculatedCylinderSteamUsageLBpS * SuperheaterSteamUsageFactor;
5557+
5558+
5559+
// Trace.TraceInformation("Steam Consumption - Eng# {0} Calc {1} Raw {2} Factor {3}", numberofengine, pS.TopH(CalculatedCylinderSteamUsageLBpS), pS.TopH(RawCalculatedCylinderSteamUsageLBpS), SuperheaterSteamUsageFactor);
55485560
}
55495561

55505562
#endregion

0 commit comments

Comments
 (0)