Skip to content

Commit 78c046c

Browse files
committed
Correct issue with tender water mass
1 parent 1dae11d commit 78c046c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1836,14 +1836,15 @@ public override void Update(float elapsedClockSeconds)
18361836
if (TendersSteamLocomotive != null)
18371837
{
18381838
if (TendersSteamLocomotive.IsTenderRequired == 1)
1839-
{
1840-
TendersSteamLocomotive.MaxTenderCoalMassKG = TenderWagonMaxCoalMassKG;
1841-
1839+
{
18421840
// Combined total water found by taking the current combined water (which may have extra water added via the auxiliary tender), and subtracting the
18431841
// amount of water defined in the ENG file, and adding the water defiend in the WAG file.
18441842
float TempMaxCombinedWater = TendersSteamLocomotive.MaxTotalCombinedWaterVolumeUKG;
18451843
TendersSteamLocomotive.MaxTotalCombinedWaterVolumeUKG = (TempMaxCombinedWater - (Kg.ToLb(TendersSteamLocomotive.MaxLocoTenderWaterMassKG) / WaterLBpUKG)) + (Kg.ToLb(TenderWagonMaxWaterMassKG) / WaterLBpUKG);
18461844

1845+
TendersSteamLocomotive.MaxTenderCoalMassKG = TenderWagonMaxCoalMassKG;
1846+
TendersSteamLocomotive.MaxLocoTenderWaterMassKG = TenderWagonMaxWaterMassKG;
1847+
18471848
if (Simulator.Settings.VerboseConfigurationMessages)
18481849
{
18491850
Trace.TraceInformation("Fuel and Water Masses adjusted to Tender Values Specified in WAG File - Coal mass {0} kg, Water Mass {1}", FormatStrings.FormatMass(TendersSteamLocomotive.MaxTenderCoalMassKG, IsMetric), FormatStrings.FormatFuelVolume(L.FromGUK(TendersSteamLocomotive.MaxTotalCombinedWaterVolumeUKG), IsMetric, IsUK));

0 commit comments

Comments
 (0)