Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 21ff10b

Browse files
committed
Automatic merge of T1.5.1-482-g7f7dd9993 and 7 pull requests
- Pull request #570 at 7269d24: Experimental glTF 2.0 support with PBR lighting - Pull request #757 at d9d75f4: Unify RailDriver code implementations - Pull request #799 at dc03850: Consolidated wind simulation - Pull request #821 at cc3af66: Adds suppression of safety valves - Pull request #829 at 434af02: Improvements for air brakes #3 - Emergency valves - Pull request #839 at d00beb9: First phase of https://blueprints.launchpad.net/or/+spec/additional-cruise-control-parameters - Pull request #842 at 9c2724d: Set up ability for steam locomotives to have multiple engines
9 parents de37924 + 7f7dd99 + 7269d24 + d9d75f4 + dc03850 + cc3af66 + 434af02 + d00beb9 + 9c2724d commit 21ff10b

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Source/Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2849,13 +2849,13 @@ public void SimpleAdhesion()
28492849
max1 = MaxForceN;
28502850
//add sander
28512851
if (Sander && AbsSpeedMpS < SanderSpeedOfMpS && CurrentTrackSandBoxCapacityM3 > 0.0 && MainResPressurePSI > 80.0)
2852-
{
2853-
switch (Simulator.WeatherType)
2854-
{
2852+
{
2853+
switch (Simulator.WeatherType)
2854+
{
28552855
case WeatherType.Clear: SandingFrictionFactor = 1.2f; break;
28562856
case WeatherType.Rain: SandingFrictionFactor = 1.8f; break;
28572857
case WeatherType.Snow: SandingFrictionFactor = 2.5f; break;
2858-
}
2858+
}
28592859
if (SanderSpeedEffectUpToMpS > 0.0f) // Reduce sander effectiveness if max effective speed is defined
28602860
{
28612861
SandingFrictionFactor *= (1.0f - 0.5f / SanderSpeedEffectUpToMpS * AbsSpeedMpS);
@@ -3134,7 +3134,7 @@ public virtual void UpdateFrictionCoefficient(float elapsedClockSeconds)
31343134
}
31353135
}
31363136

3137-
BaseFrictionCoefficientFactor = MathHelper.Clamp(BaseFrictionCoefficientFactor, 0.5f, 1.0f);
3137+
BaseFrictionCoefficientFactor = MathHelper.Clamp(BaseFrictionCoefficientFactor, 0.5f, 1.0f);
31383138

31393139
// Increase friction coefficient when sanding
31403140
if (Sander && AbsSpeedMpS < SanderSpeedOfMpS && CurrentTrackSandBoxCapacityM3 > 0.0 && MainResPressurePSI > 80.0)
@@ -3144,11 +3144,11 @@ public virtual void UpdateFrictionCoefficient(float elapsedClockSeconds)
31443144
case WeatherType.Clear: SandingFrictionCoefficientFactor = 1.40f; break;
31453145
case WeatherType.Rain: SandingFrictionCoefficientFactor = 1.25f; break;
31463146
case WeatherType.Snow: SandingFrictionCoefficientFactor = 1.50f; break;
3147-
}
3147+
}
31483148
if (SanderSpeedEffectUpToMpS > 0.0f) // Reduce sander effectiveness if max effective speed is defined
3149-
{
3149+
{
31503150
SandingFrictionCoefficientFactor *= (1.0f - 0.5f / SanderSpeedEffectUpToMpS * AbsSpeedMpS);
3151-
}
3151+
}
31523152
BaseFrictionCoefficientFactor *= Math.Max(SandingFrictionCoefficientFactor, 1.0f); // Prevent sand from harming adhesion above max effective speed
31533153
}
31543154

0 commit comments

Comments
 (0)