@@ -1768,9 +1768,8 @@ public override void Update(float elapsedClockSeconds)
1768
1768
}
1769
1769
}
1770
1770
}
1771
- if ( loco . LocomotivePowerSupply . DynamicBrakeAvailable )
1772
1771
{
1773
- if ( loco . DynamicBrakePercent > 0 && Car . FrictionBrakeBlendingMaxForceN > 0 )
1772
+ if ( loco . LocomotivePowerSupply . DynamicBrakeAvailable && loco . MaxDynamicBrakePercent > 0 && loco . DynamicBrakePercent > 0 && Car . FrictionBrakeBlendingMaxForceN > 0 )
1774
1773
{
1775
1774
if ( loco . DynamicBrakePartialBailOff )
1776
1775
{
@@ -1808,14 +1807,14 @@ public override void Update(float elapsedClockSeconds)
1808
1807
}
1809
1808
}
1810
1809
}
1811
- if ( loco . DynamicBrakeEngineBrakeReplacement && loco . RemoteControlGroup == 0 && loco . AbsTractionSpeedMpS < loco . DynamicBrakeEngineBrakeReplacementSpeed && loco . Train . LeadLocomotive is MSTSLocomotive lead && lead . TrainBrakeController . TrainDynamicBrakeIntervention > 0 )
1812
- {
1813
- var requiredBrakeForceN = loco . MaxDynamicBrakeForceN * lead . TrainBrakeController . TrainDynamicBrakeIntervention ;
1814
- var reverseBlendingPressurePSI = Math . Min ( Math . Max ( ( requiredBrakeForceN - loco . DynamicBrakeForceN ) / Car . FrictionBrakeBlendingMaxForceN * ReferencePressurePSI
1815
- + BrakeCylinderSpringPressurePSI , 0 ) , MaxCylPressurePSI ) ;
1816
- reverseBlendingPressurePSI /= RelayValveRatio ;
1817
- if ( demandedPressurePSI < reverseBlendingPressurePSI ) demandedPressurePSI = reverseBlendingPressurePSI ;
1818
- }
1810
+ }
1811
+ if ( loco . DynamicBrakeEngineBrakeReplacement && loco . RemoteControlGroup == 0 && loco . AbsTractionSpeedMpS < loco . DynamicBrakeEngineBrakeReplacementSpeed && loco . Train . LeadLocomotive is MSTSLocomotive lead && lead . TrainBrakeController . TrainDynamicBrakeIntervention > 0 )
1812
+ {
1813
+ var requiredBrakeForceN = loco . MaxDynamicBrakeForceN * lead . TrainBrakeController . TrainDynamicBrakeIntervention ;
1814
+ var reverseBlendingPressurePSI = Math . Min ( Math . Max ( ( requiredBrakeForceN - loco . DynamicBrakeForceN ) / Car . FrictionBrakeBlendingMaxForceN * ReferencePressurePSI
1815
+ + BrakeCylinderSpringPressurePSI , 0 ) , MaxCylPressurePSI ) ;
1816
+ reverseBlendingPressurePSI /= RelayValveRatio ;
1817
+ if ( demandedPressurePSI < reverseBlendingPressurePSI ) demandedPressurePSI = reverseBlendingPressurePSI ;
1819
1818
}
1820
1819
}
1821
1820
}
0 commit comments