@@ -431,7 +431,7 @@ public float InertiaKgm2
431431 /// <summary>
432432 /// switch between Polach and Pacha adhesion calculation
433433 /// </summary>
434- bool UsePolachAdhesion = false ;
434+ public static bool UsePolachAdhesion = false ; // "static" so it's shared by all axles of the Player's loco
435435
436436 /// <summary>
437437 /// Pre-calculation of slip characteristics at 0 slip speed
@@ -1122,22 +1122,25 @@ enum AdhesionPrecisionLevel
11221122 // into HelpWindow.PrepareFrame() temporarily.
11231123 public static bool IsPrecisionHigh ( float elapsedSeconds )
11241124 {
1125- // Switches between Polach (high precision) adhesion model and Pacha (low precision) adhesion model depending upon the PC performance
1126- switch ( PrecisionLevel )
1125+ if ( elapsedSeconds > 0 ) // Ignore period with elapsedSeconds == 0 until user starts game.
11271126 {
1128- case AdhesionPrecisionLevel . High :
1129- if ( elapsedSeconds > UpperLimitS )
1130- {
1131- var screenFrameRate = 1 / elapsedSeconds ;
1127+ // Switches between Polach (high precision) adhesion model and Pacha (low precision) adhesion model depending upon the PC performance
1128+ switch ( PrecisionLevel )
1129+ {
1130+ case AdhesionPrecisionLevel . High :
1131+ if ( elapsedSeconds > UpperLimitS )
11321132 {
1133- Trace . TraceInformation ( $ "Advanced adhesion model switched to low precision permanently after low frame rate { screenFrameRate : F1} below limit { 1 / UpperLimitS : F0} ") ;
1134- PrecisionLevel = AdhesionPrecisionLevel . Low ;
1133+ var screenFrameRate = 1 / elapsedSeconds ;
1134+ {
1135+ Trace . TraceInformation ( $ "Advanced adhesion model switched to low precision permanently after low frame rate { screenFrameRate : F1} below limit { 1 / UpperLimitS : F0} ") ;
1136+ PrecisionLevel = AdhesionPrecisionLevel . Low ;
1137+ }
11351138 }
1136- }
1137- break ;
1139+ break ;
11381140
1139- case AdhesionPrecisionLevel . Low :
1140- break ;
1141+ case AdhesionPrecisionLevel . Low :
1142+ break ;
1143+ }
11411144 }
11421145 return ( PrecisionLevel == AdhesionPrecisionLevel . High ) ;
11431146 }
0 commit comments