Skip to content

Commit 2fed4b9

Browse files
committed
Fix an issue that snuck in from previous commit
1 parent 7d0f327 commit 2fed4b9

File tree

1 file changed

+3
-1
lines changed
  • Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS

1 file changed

+3
-1
lines changed

Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -807,13 +807,15 @@ public override void Update(float elapsedClockSeconds)
807807
EmergResPressurePSI -= dp;
808808
BrakeLine1PressurePSI += dp * EmergBrakeLineVolumeRatio;
809809
}
810-
else // Quick recharge: Emergency res air used to recharge aux res on older control valves
810+
else if (!EmergResQuickRelease) // Quick recharge: Emergency res air used to recharge aux res on older control valves
811811
{
812812
float dp = elapsedClockSeconds * MaxAuxilaryChargingRatePSIpS;
813813
if (AuxResPressurePSI + dp > EmergResPressurePSI - dp / EmergAuxVolumeRatio)
814814
dp = (EmergResPressurePSI - AuxResPressurePSI) * EmergAuxVolumeRatio / (1 + EmergAuxVolumeRatio);
815815
if (BrakeLine1PressurePSI < AuxResPressurePSI + dp)
816816
dp = (BrakeLine1PressurePSI - AuxResPressurePSI);
817+
if (dp < 0)
818+
dp = 0;
817819
AuxResPressurePSI += dp;
818820
EmergResPressurePSI -= dp / EmergAuxVolumeRatio;
819821
}

0 commit comments

Comments
 (0)