Skip to content

Commit d500329

Browse files
committed
Show dynamic brake force only if active
1 parent 8555a4b commit d500329

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5024,7 +5024,7 @@ public virtual float GetDataOf(CabViewControl cvc)
50245024
data = this.LocomotiveAxles[cvc.ControlId].DriveForceN / MaxForceN * MaxCurrentA;
50255025
data = Math.Abs(data);
50265026
}
5027-
if (DynamicBrakePercent > 0 && MaxDynamicBrakeForceN > 0)
5027+
if (DynamicBrake && DynamicBrakePercent > 0 && MaxDynamicBrakeForceN > 0)
50285028
{
50295029
data = DynamicBrakeForceN / MaxDynamicBrakeForceN * DynamicBrakeMaxCurrentA;
50305030
data = -Math.Abs(data); // Ensure that dynamic force is seen as a "-ve force", changes colour on the load meter
@@ -5043,7 +5043,7 @@ public virtual float GetDataOf(CabViewControl cvc)
50435043
data = this.FilteredMotiveForceN;
50445044
else
50455045
data = this.LocomotiveAxles[cvc.ControlId].DriveForceN;
5046-
if (DynamicBrakePercent > 0)
5046+
if (DynamicBrake && DynamicBrakePercent > 0)
50475047
{
50485048
data = DynamicBrakeForceN;
50495049
}
@@ -5091,7 +5091,7 @@ public virtual float GetDataOf(CabViewControl cvc)
50915091
data = Math.Abs(this.FilteredMotiveForceN);
50925092
else
50935093
data = Math.Abs(this.LocomotiveAxles[cvc.ControlId].DriveForceN);
5094-
if (DynamicBrakePercent > 0)
5094+
if (DynamicBrake && DynamicBrakePercent > 0)
50955095
{
50965096
data = -Math.Abs(DynamicBrakeForceN);
50975097
}

0 commit comments

Comments
 (0)