@@ -640,7 +640,7 @@ public Direction Direction
640640 protected float MaxUnbalancedSuperElevationM ; // Maximum comfortable cant deficiency, read from MSTS Wagon File
641641 public float SuperElevationAngleRad ;
642642 protected bool IsMaxSafeCurveSpeed = false ; // Has equal loading speed around the curve been exceeded, ie are all the wheesl still on the track?
643- protected float ComfortTolerance = 100 .0f; // Tolerance for discomfort due to excess curve speed
643+ protected float ComfortTolerance = 1 .0f; // Tolerance for discomfort due to excess curve speed
644644 public bool IsCriticalMaxSpeed = false ; // Has the critical maximum speed around the curve been reached, is the wagon about to overturn?
645645 public bool IsCriticalMinSpeed = false ; // Is the speed less then the minimum required for the wagon to travel around the curve
646646 protected float StartCurveResistanceFactor = 2.0f ; // Set curve friction at Start = 200%
@@ -1912,9 +1912,8 @@ public virtual void UpdateCurveSpeedLimit(float elapsedClockSeconds)
19121912 if ( s > MaxSafeCurveSpeedMps )
19131913 {
19141914 // Consider a tolerance so passengers won't immediately complain, should reduce overkill notifications on routes with jerky track laying
1915- // Tolerance rapidly dies as speed excess increases, though lasts longer with consist durability set higher
19161915 // Can go negative to punish continuous speeding
1917- ComfortTolerance -= 2.5f * ( s / MaxSafeCurveSpeedMps - 1.0f ) * elapsedClockSeconds ;
1916+ ComfortTolerance -= 0.25f * ( s / MaxSafeCurveSpeedMps - 1.0f ) * elapsedClockSeconds ;
19181917
19191918 if ( ! IsMaxSafeCurveSpeed && ComfortTolerance <= 0.0f )
19201919 {
@@ -1945,10 +1944,9 @@ public virtual void UpdateCurveSpeedLimit(float elapsedClockSeconds)
19451944 IsMaxSafeCurveSpeed = false ; // reset flag for IsMaxSafeCurveSpeed reached - if speed on curve decreases
19461945 }
19471946 // Restore passenger tolerance gradually (100 seconds)
1948- // Consist durability affects how large tolerance can grow (min 25, max 100)
1949- ComfortTolerance += ( Simulator . CurveDurability + 0.25f ) * elapsedClockSeconds ;
1950- if ( ComfortTolerance > 75.0f * Simulator . CurveDurability + 25.0f )
1951- ComfortTolerance = 75.0f * Simulator . CurveDurability + 25.0f ;
1947+ ComfortTolerance += elapsedClockSeconds / 100.0f ;
1948+ if ( ComfortTolerance > 1.0f )
1949+ ComfortTolerance = 1.0f ;
19521950 }
19531951
19541952 // If speed exceeds the overturning speed, then indicated that an error condition has been reached.
@@ -2025,10 +2023,9 @@ public virtual void UpdateCurveSpeedLimit(float elapsedClockSeconds)
20252023 IsMaxSafeCurveSpeed = false ; // reset flag for IsMaxEqualLoadSpeed reached
20262024
20272025 // Restore passenger tolerance gradually (100 seconds)
2028- // Consist durability affects how large tolerance can grow
2029- ComfortTolerance += ( Simulator . CurveDurability + 0.25f ) * elapsedClockSeconds ;
2030- if ( ComfortTolerance > 75.0f * Simulator . CurveDurability + 25.0f )
2031- ComfortTolerance = 75.0f * Simulator . CurveDurability + 25.0f ;
2026+ ComfortTolerance += elapsedClockSeconds / 100.0f ;
2027+ if ( ComfortTolerance > 1.0f )
2028+ ComfortTolerance = 1.0f ;
20322029 }
20332030
20342031 }
@@ -2774,7 +2771,7 @@ public void ComputePosition(Traveller traveler, bool backToFront, float elapsedT
27742771 var y = traveler . Y ;
27752772 var z = traveler . Z + 2048 * ( traveler . TileZ - tileZ ) ;
27762773
2777- Vector3 location = new Vector3 ( x , y , z ) + traveler . CalcElevationPositionOffset ( Simulator . Settings . UseSuperElevation > 0 , out float r ) ;
2774+ Vector3 location = new Vector3 ( x , y , z ) + traveler . CalcElevationPositionOffset ( Simulator . Settings . UseSuperElevation , out float r ) ;
27782775 // This car is flipped, so flip roll direction.
27792776 r *= - 1 ;
27802777
@@ -2806,7 +2803,7 @@ public void ComputePosition(Traveller traveler, bool backToFront, float elapsedT
28062803 var y = traveler . Y ;
28072804 var z = traveler . Z + 2048 * ( traveler . TileZ - tileZ ) ;
28082805
2809- Vector3 location = new Vector3 ( x , y , z ) + traveler . CalcElevationPositionOffset ( Simulator . Settings . UseSuperElevation > 0 , out float r ) ;
2806+ Vector3 location = new Vector3 ( x , y , z ) + traveler . CalcElevationPositionOffset ( Simulator . Settings . UseSuperElevation , out float r ) ;
28102807
28112808 WheelAxles [ k ] . Part . AddWheelSetLocation ( 1 , o , location . X , location . Y , location . Z , r ) ;
28122809 }
0 commit comments