Skip to content

Commit 2268ce1

Browse files
committed
Further adjustment to brakes for control car
1 parent 7244d3a commit 2268ce1

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

Source/Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public enum SoundState
130130
public float MaxCurrentA = 0;
131131
public float MaxSpeedMpS = 1e3f;
132132
public float UnloadingSpeedMpS;
133-
public float MainResPressurePSI = 130;
133+
public float MainResPressurePSI;
134134
public bool CompressorIsOn;
135135
public float AverageForceN;
136136
public float PowerOnDelayS;
@@ -1325,14 +1325,25 @@ public override void Initialize()
13251325
{
13261326
MaxMainResPressurePSI = 130;
13271327
}
1328-
13291328
}
13301329

1330+
MainResPressurePSI = MaxMainResPressurePSI;
1331+
13311332
if (MainResVolumeM3 == 0)
13321333
{
13331334
if (EngineType == EngineTypes.Control)
13341335
{
1335-
MainResVolumeM3 = 0.01f;
1336+
FindControlActiveLocomotive();
1337+
1338+
if (ControlActiveLocomotive != null)
1339+
{
1340+
MainResVolumeM3 = ControlActiveLocomotive.MainResVolumeM3;
1341+
}
1342+
else
1343+
{
1344+
MainResVolumeM3 = 0.3f;
1345+
}
1346+
13361347
}
13371348
else
13381349
{
@@ -1798,7 +1809,7 @@ public override void Update(float elapsedClockSeconds)
17981809
}
17991810

18001811
}
1801-
else if (EngineType != EngineTypes.Control) // TODO - Control trailers would not have compressors, but if they do then need to be linked to power supply requirements
1812+
else // if (EngineType != EngineTypes.Control) // TODO - Control trailers would not have compressors, but if they do then need to be linked to power supply requirements
18021813
{
18031814
UpdateCompressor(elapsedClockSeconds);
18041815
}

0 commit comments

Comments
 (0)