Skip to content

Commit 8e50570

Browse files
committed
correct initialisation issue
1 parent 2612385 commit 8e50570

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

Source/Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2606,11 +2606,6 @@ private void UpdateFX(float elapsedClockSeconds)
26062606
// The duration time is reduced with speed to reduce the steam trail behind the locomotive when running at speed.
26072607
// Any of the steam effects can be disabled by not defining them in the ENG file, and thus they will not be displayed in the viewer.
26082608

2609-
2610-
float[] ExhaustnormalisedCrankAngleRad = new float[3];
2611-
float[] ExhaustexhaustCrankAngleRad = new float[3];
2612-
2613-
26142609
// Cylinder steam cock effects
26152610
if (CylinderAdvancedSteamEffects) // For advanced steam effects process each cylinder individually -
26162611
// - all ENG files will need to be changed.
@@ -2626,7 +2621,10 @@ private void UpdateFX(float elapsedClockSeconds)
26262621
TotalNumberCyindersEng1 = SteamEngines[0].NumberCylinders;
26272622
}
26282623

2629-
// Engine #1
2624+
float[] ExhaustnormalisedCrankAngleRad = new float[TotalNumberCyindersEng1];
2625+
float[] ExhaustexhaustCrankAngleRad = new float[TotalNumberCyindersEng1];
2626+
2627+
// Engine #1
26302628
for (int i = 0; i < TotalNumberCyindersEng1; i++)
26312629
{
26322630
var crankAngleDiffRad = WheelCrankAngleDiffRad[i];

0 commit comments

Comments
 (0)