File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Source/Orts.Simulation/Simulation/RollingStocks Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -2766,7 +2766,7 @@ protected virtual void UpdateTractiveForce(float elapsedClockSeconds)
2766
2766
{
2767
2767
if ( axle . DriveForceN != 0 && ( AdvancedAdhesionModel || ! AntiSlip ) )
2768
2768
{
2769
- if ( axle . SlipPercent > axle . SlipWarningTresholdPercent ) SlipControlActive [ i ] = true ;
2769
+ if ( axle . HuDIsWheelSlipWarning ) SlipControlActive [ i ] = true ;
2770
2770
}
2771
2771
else
2772
2772
{
@@ -2776,18 +2776,22 @@ protected virtual void UpdateTractiveForce(float elapsedClockSeconds)
2776
2776
{
2777
2777
float absForceN = Math . Abs ( axle . DriveForceN ) ;
2778
2778
float newForceN ;
2779
- if ( axle . SlipPercent < axle . SlipWarningTresholdPercent * 0.9f )
2779
+ if ( ! axle . HuDIsWheelSlipWarning )
2780
2780
{
2781
2781
// If well below slip threshold, restore full power in 10 seconds
2782
2782
newForceN = Math . Min ( Math . Abs ( prevForceN ) + absForceN * elapsedClockSeconds / 10 , absForceN ) ;
2783
2783
2784
2784
// If full force is restored, disengage slip control
2785
2785
if ( newForceN / absForceN > 0.95f ) SlipControlActive [ i ] = false ;
2786
2786
}
2787
- else
2787
+ else if ( axle . IsWheelSlipWarning )
2788
2788
{
2789
2789
newForceN = Math . Max ( Math . Abs ( prevForceN ) - absForceN * elapsedClockSeconds / 3 , 0 ) ;
2790
2790
}
2791
+ else
2792
+ {
2793
+ newForceN = absForceN ;
2794
+ }
2791
2795
if ( axle . DriveForceN > 0 && prevForceN >= 0 ) axle . DriveForceN = newForceN ;
2792
2796
else if ( axle . DriveForceN < 0 && prevForceN <= 0 ) axle . DriveForceN = - newForceN ;
2793
2797
}
You can’t perform that action at this time.
0 commit comments