Skip to content

Commit 7b73c48

Browse files
authored
Merge pull request #522 from peternewell/tender-water#1
Correct issue with tender water mass
2 parents f92b5fa + 46b388f commit 7b73c48

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

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

Lines changed: 5 additions & 4 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
1843-
// amount of water defined in the ENG file, and adding the water defiend in the WAG file.
1841+
// amount of water defined in the ENG file, and adding the water defined 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)