@@ -286,7 +286,9 @@ public override void Initialize(bool handbrakeOn, float maxPressurePSI, float fu
286286 if ( Car . Simulator . Settings . CorrectQuestionableBrakingParams && Car . CarLengthM <= 1 )
287287 EmergResVolumeM3 = Math . Min ( 0.02f , EmergResVolumeM3 ) ;
288288
289- if ( Car . Simulator . Settings . CorrectQuestionableBrakingParams && ( Car as MSTSWagon ) . BrakeValve == MSTSWagon . BrakeValveType . None )
289+ // Install a plain triple valve if no brake valve defined
290+ // Do not install it for tenders if not defined, to allow tenders with straight brake only
291+ if ( Car . Simulator . Settings . CorrectQuestionableBrakingParams && ( Car as MSTSWagon ) . BrakeValve == MSTSWagon . BrakeValveType . None && ( Car as MSTSWagon ) . WagonType != TrainCar . WagonTypes . Tender )
290292 {
291293 ( Car as MSTSWagon ) . BrakeValve = MSTSWagon . BrakeValveType . TripleValve ;
292294 Trace . TraceWarning ( "{0} does not define a brake valve, defaulting to a plain triple valve" , ( Car as MSTSWagon ) . WagFilePath ) ;
@@ -352,7 +354,7 @@ public void UpdateTripleValveState(float elapsedClockSeconds)
352354 else
353355 TripleValveState = ValveState . Lap ;
354356 }
355- else if ( valveType == MSTSWagon . BrakeValveType . TripleValve || valveType == MSTSWagon . BrakeValveType . Distributor )
357+ else if ( valveType == MSTSWagon . BrakeValveType . TripleValve || valveType == MSTSWagon . BrakeValveType . DistributingValve )
356358 {
357359 if ( BrakeLine1PressurePSI < AuxResPressurePSI - 1 && EmergencyValveActuationRatePSIpS > 0 && ( prevBrakePipePressurePSI - BrakeLine1PressurePSI ) > Math . Max ( elapsedClockSeconds , 0.0001f ) * EmergencyValveActuationRatePSIpS )
358360 TripleValveState = ValveState . Emergency ;
@@ -442,7 +444,7 @@ public override void Update(float elapsedClockSeconds)
442444 }
443445
444446 // triple valve set to release pressure in brake cylinder and EP valve set
445- if ( TripleValveState == ValveState . Release )
447+ if ( TripleValveState == ValveState . Release && ( Car as MSTSWagon ) . BrakeValve != MSTSWagon . BrakeValveType . None )
446448 {
447449 if ( ( Car as MSTSWagon ) . EmergencyReservoirPresent )
448450 {
0 commit comments