Skip to content

Commit ad0cd0e

Browse files
committed
Fix bug with MSTS versions
1 parent c0e78f2 commit ad0cd0e

File tree

1 file changed

+1
-1
lines changed
  • Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerTransmissions

1 file changed

+1
-1
lines changed

Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerTransmissions/GearBox.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,7 @@ public void Initialize()
812812
// Trace.TraceInformation("MaxTractiveForce - CarID {0} MaxTE {1} ")
813813
}
814814
// For purposes of calculating engine efficiency the tractive force at maximum gear speed needs to be used.
815-
if (GearBoxParams.GearBoxTractiveForceAtSpeedN[i] != 0)
815+
if (GearBoxParams.GearBoxTractiveForceAtSpeedN != null && GearBoxParams.GearBoxTractiveForceAtSpeedN[i] != 0)
816816
{
817817
// Assume that user has entered the TE at max speed already in the Eng
818818
Gears[i].TractiveForceatMaxSpeedN = GearBoxParams.GearBoxTractiveForceAtSpeedN[i] / Locomotive.DieselEngines.Count;

0 commit comments

Comments
 (0)