Skip to content

Commit e549403

Browse files
authored
Merge pull request #583 from Csantucci/ORTS_SIGNED_TRACTION_BRAKING-glitch-fix
Bug fix for https://bugs.launchpad.net/or/+bug/1959660 Glitch in ORTS_SIGNED_TRACTION_BRAKING
2 parents 0dc3392 + 6a66eb2 commit e549403

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4553,11 +4553,11 @@ public virtual float GetDataOf(CabViewControl cvc)
45534553
MaxCurrentA = (float)cvc.MaxValue;
45544554
if (DynamicBrakeMaxCurrentA == 0)
45554555
DynamicBrakeMaxCurrentA = (float)cvc.MinValue;
4556-
if (ThrottlePercent > 0)
4556+
if (ThrottlePercent >= 0 && DynamicBrakePercent == -1)
45574557
{
45584558
data = (data / MaxForceN) * MaxCurrentA;
45594559
}
4560-
if (DynamicBrakePercent > 0)
4560+
if (ThrottlePercent == 0 && DynamicBrakePercent >= 0)
45614561
{
45624562
data = (data / MaxDynamicBrakeForceN) * DynamicBrakeMaxCurrentA;
45634563
}

0 commit comments

Comments
 (0)