@@ -2849,13 +2849,13 @@ public void SimpleAdhesion()
2849
2849
max1 = MaxForceN ;
2850
2850
//add sander
2851
2851
if ( Sander && AbsSpeedMpS < SanderSpeedOfMpS && CurrentTrackSandBoxCapacityM3 > 0.0 && MainResPressurePSI > 80.0 )
2852
- {
2853
- switch ( Simulator . WeatherType )
2854
- {
2852
+ {
2853
+ switch ( Simulator . WeatherType )
2854
+ {
2855
2855
case WeatherType . Clear : SandingFrictionFactor = 1.2f ; break ;
2856
2856
case WeatherType . Rain : SandingFrictionFactor = 1.8f ; break ;
2857
2857
case WeatherType . Snow : SandingFrictionFactor = 2.5f ; break ;
2858
- }
2858
+ }
2859
2859
if ( SanderSpeedEffectUpToMpS > 0.0f ) // Reduce sander effectiveness if max effective speed is defined
2860
2860
{
2861
2861
SandingFrictionFactor *= ( 1.0f - 0.5f / SanderSpeedEffectUpToMpS * AbsSpeedMpS ) ;
@@ -3134,7 +3134,7 @@ public virtual void UpdateFrictionCoefficient(float elapsedClockSeconds)
3134
3134
}
3135
3135
}
3136
3136
3137
- BaseFrictionCoefficientFactor = MathHelper . Clamp ( BaseFrictionCoefficientFactor , 0.5f , 1.0f ) ;
3137
+ BaseFrictionCoefficientFactor = MathHelper . Clamp ( BaseFrictionCoefficientFactor , 0.5f , 1.0f ) ;
3138
3138
3139
3139
// Increase friction coefficient when sanding
3140
3140
if ( Sander && AbsSpeedMpS < SanderSpeedOfMpS && CurrentTrackSandBoxCapacityM3 > 0.0 && MainResPressurePSI > 80.0 )
@@ -3144,11 +3144,11 @@ public virtual void UpdateFrictionCoefficient(float elapsedClockSeconds)
3144
3144
case WeatherType . Clear : SandingFrictionCoefficientFactor = 1.40f ; break ;
3145
3145
case WeatherType . Rain : SandingFrictionCoefficientFactor = 1.25f ; break ;
3146
3146
case WeatherType . Snow : SandingFrictionCoefficientFactor = 1.50f ; break ;
3147
- }
3147
+ }
3148
3148
if ( SanderSpeedEffectUpToMpS > 0.0f ) // Reduce sander effectiveness if max effective speed is defined
3149
- {
3149
+ {
3150
3150
SandingFrictionCoefficientFactor *= ( 1.0f - 0.5f / SanderSpeedEffectUpToMpS * AbsSpeedMpS ) ;
3151
- }
3151
+ }
3152
3152
BaseFrictionCoefficientFactor *= Math . Max ( SandingFrictionCoefficientFactor , 1.0f ) ; // Prevent sand from harming adhesion above max effective speed
3153
3153
}
3154
3154
0 commit comments