Skip to content

Commit 9e41cbb

Browse files
committed
Fix two other usages of saved and current values
1 parent ea06d46 commit 9e41cbb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -2465,7 +2465,7 @@ protected virtual void UpdateControllers(float elapsedClockSeconds)
24652465
{
24662466
LocalDynamicBrakePercent = Math.Max(LocalDynamicBrakePercent, CruiseControl.DynamicBrakePercent.Value);
24672467
}
2468-
if (DynamicBrakeController != null && DynamicBrakeController.CurrentValue > 0)
2468+
if (DynamicBrakeController != null && DynamicBrakeController.SavedValue > 0)
24692469
{
24702470
LocalDynamicBrakePercent = Math.Max(LocalDynamicBrakePercent, DynamicBrakeController.SavedValue * 100);
24712471
}
@@ -5069,7 +5069,7 @@ public bool CheckDisableDynamicBrake()
50695069
protected bool CanUseDynamicBrake()
50705070
{
50715071
return (DynamicBrakeController != null
5072-
&& ThrottlePercent == 0);
5072+
&& ThrottleController.CurrentValue == 0);
50735073
}
50745074

50755075
public override string GetDynamicBrakeStatus()

0 commit comments

Comments
 (0)