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)
345345 if ( SteamBrakingCurrentFraction < SteamBrakeDesiredFraction ) // Brake application, increase steam brake pressure to max value as appropriate
346346 {
347347
348- SteamBrakingCurrentFraction += elapsedClockSeconds * lead . EngineBrakeController . ApplyRatePSIpS / conversionFactor ;
348+ var diff = elapsedClockSeconds * lead . EngineBrakeController . ApplyRatePSIpS / conversionFactor ;
349+
350+ SteamBrakingCurrentFraction += diff ;
349351 if ( SteamBrakingCurrentFraction > 1.0f )
350352 {
351353 SteamBrakingCurrentFraction = 1.0f ;
@@ -354,7 +356,10 @@ public override void Update(float elapsedClockSeconds)
354356 }
355357 else if ( SteamBrakingCurrentFraction > SteamBrakeDesiredFraction ) // Brake release, decrease steam brake pressure to min value as appropriate
356358 {
357- SteamBrakingCurrentFraction -= elapsedClockSeconds * lead . EngineBrakeController . ReleaseRatePSIpS / conversionFactor ;
359+
360+ var diff = elapsedClockSeconds * lead . EngineBrakeController . ReleaseRatePSIpS / conversionFactor ;
361+
362+ SteamBrakingCurrentFraction -= diff ;
358363
359364 if ( SteamBrakingCurrentFraction < 0 )
360365 {
@@ -376,6 +381,7 @@ public override void Update(float elapsedClockSeconds)
376381 float equivalentBrakeLine3PressurePSI = equivalentEngineBrakePipeFraction * ( MinimumVacuumPressureValue - MaximumVacuumPressureValue ) + MaximumVacuumPressureValue ;
377382
378383 lead . BrakeSystem . BrakeLine3PressurePSI = equivalentBrakeLine3PressurePSI ; // If engine brake on, then don't allow engine brake pressure to drop when reducing train brake pressure
384+
379385 EngineBrakePipeFraction = SteamBrakingCurrentFraction ;
380386 Car . PreviousSteamBrakeCylinderPressurePSI = 0 ; // set to zero so that this loop is not executed again until train brake is activated
381387 }
You can’t perform that action at this time.
0 commit comments