Skip to content

Commit 7dfc0a7

Browse files
committed
Automatic merge of T1.5.1-770-g1f196a324 and 14 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 #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 #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 d7a19ee: Extra line with all the arguments for debugging purposes in logfile - Pull request #899 at c17fdb3: Duplex steam engines - Booster Engine addition
16 parents 95c5783 + 1f196a3 + 3539862 + d00beb9 + 43bf33e + f92de76 + a055bca + d9ce84b + 6c0785b + 1f5ba4c + bf8876b + 5ff1e73 + 5866028 + 0a9d939 + d7a19ee + c17fdb3 commit 7dfc0a7

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

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

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,9 @@ public class MSTSSteamLocomotive : MSTSLocomotive
133133
public bool SteamBoosterRunMode = false;
134134
public bool SteamBoosterIdleMode = false;
135135
public bool SteamBoosterLatchedLocked = false;
136+
float BoosterGearEngageTimeS;
137+
float BoosterIdleTimeS;
138+
float BoosterGearEngageTimeStartS;
136139
public float HuDBoosterSteamConsumptionLbpS;
137140
public float BoosterSteamConsumptionLbpS;
138141
float BoosterIdleChokeSizeIn;
@@ -2237,19 +2240,26 @@ public override void Update(float elapsedClockSeconds)
22372240
SteamBoosterRunMode = false;
22382241
SteamBoosterIdleMode = true;
22392242
enginethrottle = 0.0f;
2243+
BoosterGearEngageTimeS = 0;
22402244
}
22412245
// Run mode
22422246
else if (SteamBoosterAirOpen && SteamBoosterIdle && SteamBoosterLatchedLocked)
22432247
{
2244-
SteamBoosterIdleMode = false;
2245-
SteamBoosterRunMode = true;
2246-
enginethrottle = throttle;
2248+
if (BoosterGearEngageTimeS > 6)
2249+
{
2250+
SteamBoosterIdleMode = false;
2251+
SteamBoosterRunMode = true;
2252+
enginethrottle = throttle;
2253+
}
2254+
BoosterGearEngageTimeS += elapsedClockSeconds;
22472255
}
2248-
else if (!SteamBoosterAirOpen || !SteamBoosterLatchedLocked)
2256+
else if (!SteamBoosterAirOpen || !SteamBoosterLatchedLocked) // Turn Booster off completely
22492257
{
22502258
SteamBoosterRunMode = false;
22512259
SteamBoosterIdleMode = false;
22522260
enginethrottle = 0;
2261+
BoosterGearEngageTimeS = 0;
2262+
BoosterIdleTimeS = 0;
22532263
}
22542264

22552265
UpdateCylinders(elapsedClockSeconds, enginethrottle, boostercutoff, absSpeedMpS, i);

0 commit comments

Comments
 (0)