Skip to content

Commit bb47cc7

Browse files
committed
Automatic merge of T1.5.1-757-gef6c1a8c8 and 16 pull requests
- Pull request #570 at 3539862: Experimental glTF 2.0 support with PBR lighting - Pull request #839 at d00beb9: First phase of https://blueprints.launchpad.net/or/+spec/additional-cruise-control-parameters - Pull request #874 at f8dbeab: Dynamic brake controller refactoring - Pull request #875 at 43bf33e: Bug fix for https://bugs.launchpad.net/or/+bug/2036346 Player train switching doesn't work with 3D cabs - Pull request #876 at f92de76: docs: add source for documents previously on website to source Documentation folder - Pull request #882 at a055bca: Blueprint/train car operations UI window - Pull request #885 at d9ce84b: feat: Add notifications to Menu - Pull request #886 at 6c0785b: Scene viewer extension to TrackViewer - Pull request #888 at b20b888: docs: Document player application model - Pull request #892 at 1f5ba4c: Signal Function OPP_SIG_ID_TRAINPATH - Pull request #893 at bf8876b: Signal errors - Pull request #894 at 5ff1e73: Correct Decrease Colour - Pull request #896 at 5866028: First implementation of https://blueprints.launchpad.net/or/+spec/specific-sounds-for-ai-trains - Pull request #897 at 0a9d939: feat: Improved system information collection - Pull request #898 at e271395: Extra line with all the arguments for debugging purposes in logfile - Pull request #899 at 549ca09: Duplex steam engines - Booster Engine addition
18 parents da90184 + ef6c1a8 + 3539862 + d00beb9 + f8dbeab + 43bf33e + f92de76 + a055bca + d9ce84b + 6c0785b + b20b888 + 1f5ba4c + bf8876b + 5ff1e73 + 5866028 + 0a9d939 + e271395 + 549ca09 commit bb47cc7

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

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

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2198,6 +2198,7 @@ public override void Update(float elapsedClockSeconds)
21982198
MotiveForceN = 0;
21992199
CylinderSteamUsageLBpS = 0;
22002200
CylCockSteamUsageLBpS = 0;
2201+
MeanEffectivePressurePSI = 0;
22012202

22022203
for (int i = 0; i < SteamEngines.Count; i++)
22032204
{
@@ -2273,10 +2274,12 @@ public override void Update(float elapsedClockSeconds)
22732274
CumulativeCylinderSteamConsumptionLbs += SteamEngines[i].CylinderSteamUsageLBpS * elapsedClockSeconds;
22742275
CylinderSteamUsageLBpS += SteamEngines[i].CylinderSteamUsageLBpS;
22752276
CylCockSteamUsageLBpS += SteamEngines[i].CylCockSteamUsageLBpS;
2276-
2277-
2278-
SteamEngines[i].MeanEffectivePressurePSI = MeanEffectivePressurePSI;
22792277

2278+
if (SteamEngines[i].MeanEffectivePressurePSI > MeanEffectivePressurePSI)
2279+
{
2280+
MeanEffectivePressurePSI = SteamEngines[i].MeanEffectivePressurePSI;
2281+
}
2282+
22802283
SteamEngines[i].TractiveForceN = 0;
22812284

22822285
float tractiveforcethrottle = 0;
@@ -4899,6 +4902,11 @@ private void UpdateCylinders(float elapsedClockSeconds, float throttle, float cu
48994902
SteamEngines[numberofengine].MeanEffectivePressurePSI = TotalWorkInLbs / Me.ToIn(SteamEngines[numberofengine].CylindersStrokeM); // MEP doen't need to be converted from Atm to gauge pressure as it is a differential pressure.
49004903
SteamEngines[numberofengine].MeanEffectivePressurePSI = MathHelper.Clamp(SteamEngines[numberofengine].MeanEffectivePressurePSI, 0, MaxBoilerPressurePSI); // Make sure that Cylinder pressure does not go negative
49014904

4905+
if (throttle < 0.01)
4906+
{
4907+
SteamEngines[numberofengine].MeanEffectivePressurePSI = 0;
4908+
}
4909+
49024910
#if DEBUG_LOCO_STEAM_MEP
49034911
if (DebugWheelRevs >= 55.0 && DebugWheelRevs < 55.1 | DebugWheelRevs >= 110.0 && DebugWheelRevs < 110.1 | DebugWheelRevs >= 165.0 && DebugWheelRevs < 165.05 | DebugWheelRevs >= 220.0 && DebugWheelRevs < 220.05)
49044912
{

0 commit comments

Comments
 (0)