File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed
Source/Orts.Simulation/Simulation/RollingStocks/SubSystems Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -162,6 +162,11 @@ public override void Update(float elapsedClockSeconds)
162162 float brakeShoeFriction = Car . GetBrakeShoeFrictionFactor ( ) ;
163163 Car . HuDBrakeShoeFriction = Car . GetBrakeShoeFrictionCoefficientHuD ( ) ;
164164
165+ // Update anglecock opening. Anglecocks set to gradually open over 30 seconds, but close instantly.
166+ // Gradual opening prevents undesired emergency applications
167+ UpdateAngleCockState ( AngleCockAOpen , ref AngleCockAOpenAmount , ref AngleCockAOpenTime ) ;
168+ UpdateAngleCockState ( AngleCockBOpen , ref AngleCockBOpenAmount , ref AngleCockBOpenTime ) ;
169+
165170 Car . BrakeRetardForceN = ( Car . MaxHandbrakeForceN * HandbrakePercent / 100 ) * brakeShoeFriction ; // calculates value of force applied to wheel, independent of wheel skid
166171 if ( Car . BrakeSkid ) // Test to see if wheels are skiding to excessive brake force
167172 {
Original file line number Diff line number Diff line change @@ -123,9 +123,15 @@ public override void Update(float elapsedClockSeconds)
123123 if ( Train . Simulator . PlayerLocomotive . Train == Train && EOTState == EOTstate . ArmedTwoWay &&
124124 ( EOTEmergencyBrakingOn ||
125125 ( Train . Simulator . PlayerLocomotive as MSTSLocomotive ) . TrainBrakeController . GetStatus ( ) . ToLower ( ) . StartsWith ( "emergency" ) ) )
126- Train . Cars . Last ( ) . BrakeSystem . AngleCockBOpen = true ;
126+ {
127+ // Simulate EOT opening brake pipe to atmosphere by instantly opening rear anglecock
128+ this . BrakeSystem . AngleCockBOpen = true ;
129+ this . BrakeSystem . AngleCockBOpenAmount = 1 ;
130+ }
127131 else
128- Train . Cars . Last ( ) . BrakeSystem . AngleCockBOpen = false ;
132+ {
133+ this . BrakeSystem . AngleCockBOpen = false ;
134+ }
129135 base . Update ( elapsedClockSeconds ) ;
130136 }
131137
@@ -277,4 +283,4 @@ public void EmergencyBrake (bool toState)
277283 }
278284
279285 }
280- }
286+ }
You can’t perform that action at this time.
0 commit comments