Skip to content

Commit 37bc073

Browse files
committed
Automatic merge of T1.6-rc3-30-gdf7bf1a26 and 13 pull requests
- Pull request #1104 at 1f7af77: Handle simple adhesion within the axle module - Pull request #1057 at 1c2bcb4: Switchable brake system - Pull request #1086 at e10390b: Add Settings Exporter tool (copy settings to INI, etc) - Pull request #1091 at 7fc8de1: Automatic speed control - Pull request #1110 at 387388e: Fix Activity Runner persists after loading exception - Pull request #1115 at 270f22f: Do not activate ETS switch if no suitable cars are attached - Pull request #1121 at 91d2d26: Manually Override Articulation - Pull request #1123 at dc286f5: Handle null control active locomotive - Pull request #1125 at 7a4f055: Lift #1096 into 1.6 release - Pull request #1129 at 034b6e2: adds missing es.po files - Pull request #1082 at 5845a1a: Allow variable water level in glass gauge - Pull request #1081 at 689494b: Brake cuts power unification - Pull request #1124 at fab5457: Built-in PBL2 brake controller
15 parents 1a95668 + df7bf1a + 1f7af77 + 1c2bcb4 + e10390b + 7fc8de1 + 387388e + 270f22f + 91d2d26 + dc286f5 + 7a4f055 + 034b6e2 + 5845a1a + 689494b + fab5457 commit 37bc073

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2769,7 +2769,7 @@ protected virtual void UpdateTractiveForce(float elapsedClockSeconds)
27692769
{
27702770
if (axle.DriveForceN != 0 && (AdvancedAdhesionModel || !AntiSlip))
27712771
{
2772-
if (axle.SlipPercent > axle.SlipWarningTresholdPercent) SlipControlActive[i] = true;
2772+
if (axle.HuDIsWheelSlipWarning) SlipControlActive[i] = true;
27732773
}
27742774
else
27752775
{
@@ -2779,18 +2779,22 @@ protected virtual void UpdateTractiveForce(float elapsedClockSeconds)
27792779
{
27802780
float absForceN = Math.Abs(axle.DriveForceN);
27812781
float newForceN;
2782-
if (axle.SlipPercent < axle.SlipWarningTresholdPercent * 0.9f)
2782+
if (!axle.HuDIsWheelSlipWarning)
27832783
{
27842784
// If well below slip threshold, restore full power in 10 seconds
27852785
newForceN = Math.Min(Math.Abs(prevForceN) + absForceN * elapsedClockSeconds / 10, absForceN);
27862786

27872787
// If full force is restored, disengage slip control
27882788
if (newForceN / absForceN > 0.95f) SlipControlActive[i] = false;
27892789
}
2790-
else
2790+
else if (axle.IsWheelSlipWarning)
27912791
{
27922792
newForceN = Math.Max(Math.Abs(prevForceN) - absForceN * elapsedClockSeconds / 3, 0);
27932793
}
2794+
else
2795+
{
2796+
newForceN = absForceN;
2797+
}
27942798
if (axle.DriveForceN > 0 && prevForceN >= 0) axle.DriveForceN = newForceN;
27952799
else if (axle.DriveForceN < 0 && prevForceN <= 0) axle.DriveForceN = -newForceN;
27962800
}

0 commit comments

Comments
 (0)