Skip to content

Commit 72b9655

Browse files
committed
Disable random slippery spots if random changes are disabled
1 parent d599941 commit 72b9655

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3120,7 +3120,7 @@ public virtual void UpdateFrictionCoefficient(float elapsedClockSeconds)
31203120
Train.SlipperySpotLengthM = 10 + 40 * (float)Simulator.Random.NextDouble();
31213121
Train.SlipperySpotDistanceM = Train.SlipperySpotLengthM + 2000 * (float)Simulator.Random.NextDouble();
31223122
}
3123-
if (Train.SlipperySpotDistanceM < Train.SlipperySpotLengthM)
3123+
if (Train.SlipperySpotDistanceM < Train.SlipperySpotLengthM && Simulator.Settings.AdhesionFactorChange > 0)
31243124
{
31253125
if (BaseFrictionCoefficientFactor > 0.6 && BaseFrictionCoefficientFactor < 0.8)
31263126
{

0 commit comments

Comments
 (0)