Skip to content

Commit 0a9b8a6

Browse files
committed
Better dynamic brake handling
1 parent 5e31b23 commit 0a9b8a6

File tree

5 files changed

+77
-132
lines changed

5 files changed

+77
-132
lines changed

Source/Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,7 @@ protected override void UpdateTractiveForce(float elapsedClockSeconds, float t,
757757
// Note typically only one of the above will only ever be non-zero at the one time.
758758
// For flipped locomotives the force is "flipped" elsewhere, whereas dynamic brake force is "flipped" below by the direction of the speed.
759759

760-
if (DynamicBrakePercent > 0 && DynamicBrakeForceCurves != null && AbsSpeedMpS > 0)
760+
if (DynamicBrakePercent > 0 && DynamicBrake && DynamicBrakeForceCurves != null && AbsSpeedMpS > 0)
761761
{
762762
float f = DynamicBrakeForceCurves.Get(.01f * DynamicBrakePercent, AbsTractionSpeedMpS);
763763
if (f > 0 && LocomotivePowerSupply.DynamicBrakeAvailable)

0 commit comments

Comments
 (0)