We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0017b1a commit 86d38a2Copy full SHA for 86d38a2
Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerTransmissions/Axle.cs
@@ -1305,6 +1305,9 @@ void Integrate(float elapsedClockSeconds)
1305
/// <param name="elapsedSeconds"></param>
1306
public virtual void Update(float elapsedSeconds)
1307
{
1308
+ if (float.IsNaN(TrainSpeedMpS)) TrainSpeedMpS = 0;
1309
+ if (double.IsNaN(AxleSpeedMpS)) AxleSpeedMpS = 0;
1310
+
1311
bool advancedAdhesion = Car is MSTSLocomotive locomotive && locomotive.AdvancedAdhesionModel;
1312
advancedAdhesion &= DriveType != AxleDriveType.NotDriven; // Skip integrator for undriven axles to save CPU
1313
forceToAccelerationFactor = WheelRadiusM * WheelRadiusM / totalInertiaKgm2;
0 commit comments