File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -345,7 +345,9 @@ public override void Update(float elapsedClockSeconds)
345
345
if ( SteamBrakingCurrentFraction < SteamBrakeDesiredFraction ) // Brake application, increase steam brake pressure to max value as appropriate
346
346
{
347
347
348
- SteamBrakingCurrentFraction += elapsedClockSeconds * lead . EngineBrakeController . ApplyRatePSIpS / conversionFactor ;
348
+ var diff = elapsedClockSeconds * lead . EngineBrakeController . ApplyRatePSIpS / conversionFactor ;
349
+
350
+ SteamBrakingCurrentFraction += diff ;
349
351
if ( SteamBrakingCurrentFraction > 1.0f )
350
352
{
351
353
SteamBrakingCurrentFraction = 1.0f ;
@@ -354,7 +356,10 @@ public override void Update(float elapsedClockSeconds)
354
356
}
355
357
else if ( SteamBrakingCurrentFraction > SteamBrakeDesiredFraction ) // Brake release, decrease steam brake pressure to min value as appropriate
356
358
{
357
- SteamBrakingCurrentFraction -= elapsedClockSeconds * lead . EngineBrakeController . ReleaseRatePSIpS / conversionFactor ;
359
+
360
+ var diff = elapsedClockSeconds * lead . EngineBrakeController . ReleaseRatePSIpS / conversionFactor ;
361
+
362
+ SteamBrakingCurrentFraction -= diff ;
358
363
359
364
if ( SteamBrakingCurrentFraction < 0 )
360
365
{
@@ -376,6 +381,7 @@ public override void Update(float elapsedClockSeconds)
376
381
float equivalentBrakeLine3PressurePSI = equivalentEngineBrakePipeFraction * ( MinimumVacuumPressureValue - MaximumVacuumPressureValue ) + MaximumVacuumPressureValue ;
377
382
378
383
lead . BrakeSystem . BrakeLine3PressurePSI = equivalentBrakeLine3PressurePSI ; // If engine brake on, then don't allow engine brake pressure to drop when reducing train brake pressure
384
+
379
385
EngineBrakePipeFraction = SteamBrakingCurrentFraction ;
380
386
Car . PreviousSteamBrakeCylinderPressurePSI = 0 ; // set to zero so that this loop is not executed again until train brake is activated
381
387
}
You can’t perform that action at this time.
0 commit comments