Skip to content

Commit 9311b6d

Browse files
committed
Automatic merge of T1.5.1-658-g66411058c and 6 pull requests
- Pull request #839 at d00beb9: First phase of https://blueprints.launchpad.net/or/+spec/additional-cruise-control-parameters - Pull request #865 at 776d6df: Dispatcher window improvements - Pull request #874 at 86d58ff: 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 #877 at a0bd9ec: Initail build of duplex steam
8 parents e1d5355 + 6641105 + d00beb9 + 776d6df + 86d58ff + 43bf33e + f92de76 + a0bd9ec commit 9311b6d

File tree

1 file changed

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

1 file changed

+8
-8
lines changed

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1401,16 +1401,16 @@ protected static void PropagateBrakeLinePressures(float elapsedClockSeconds, Tra
14011401

14021402
// Equalize main reservoir with MR pipe for every locomotive
14031403
if (car.BrakeSystem.TwoPipes)
1404-
{
1405-
float volumeRatio = loco.BrakeSystem.BrakePipeVolumeM3 / loco.MainResVolumeM3;
1406-
float dp = Math.Min((loco.MainResPressurePSI - loco.BrakeSystem.BrakeLine2PressurePSI) / (1 + volumeRatio), loco.MaximumMainReservoirPipePressurePSI - loco.BrakeSystem.BrakeLine2PressurePSI);
1407-
loco.MainResPressurePSI -= dp * volumeRatio;
1408-
loco.BrakeSystem.BrakeLine2PressurePSI += dp;
1409-
if (loco.MainResPressurePSI < 0) loco.MainResPressurePSI = 0;
1410-
if (loco.BrakeSystem.BrakeLine2PressurePSI < 0) loco.BrakeSystem.BrakeLine2PressurePSI = 0;
1404+
{
1405+
float volumeRatio = loco.BrakeSystem.BrakePipeVolumeM3 / loco.MainResVolumeM3;
1406+
float dp = Math.Min((loco.MainResPressurePSI - loco.BrakeSystem.BrakeLine2PressurePSI) / (1 + volumeRatio), loco.MaximumMainReservoirPipePressurePSI - loco.BrakeSystem.BrakeLine2PressurePSI);
1407+
loco.MainResPressurePSI -= dp * volumeRatio;
1408+
loco.BrakeSystem.BrakeLine2PressurePSI += dp;
1409+
if (loco.MainResPressurePSI < 0) loco.MainResPressurePSI = 0;
1410+
if (loco.BrakeSystem.BrakeLine2PressurePSI < 0) loco.BrakeSystem.BrakeLine2PressurePSI = 0;
1411+
}
14111412
}
14121413
}
1413-
}
14141414

14151415
// Propagate engine brake pipe (3) data
14161416
for (int i = 0; i < train.Cars.Count; i++)

0 commit comments

Comments
 (0)