Skip to content

Commit a0ed396

Browse files
committed
Further adjustments to control car initialisation
1 parent 9a0a46e commit a0ed396

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

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

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1328,11 +1328,22 @@ public override void Initialize()
13281328

13291329
}
13301330

1331+
MainResPressurePSI = MaxMainResPressurePSI;
1332+
13311333
if (MainResVolumeM3 == 0)
13321334
{
13331335
if (EngineType == EngineTypes.Control)
13341336
{
1335-
MainResVolumeM3 = 0.01f;
1337+
FindControlActiveLocomotive();
1338+
1339+
if (ControlActiveLocomotive != null)
1340+
{
1341+
MainResVolumeM3 = ControlActiveLocomotive.MainResVolumeM3;
1342+
}
1343+
else
1344+
{
1345+
MainResVolumeM3 = 0.3f;
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)