Skip to content

Commit 1ccdf71

Browse files
committed
Small correction
1 parent 8cbc503 commit 1ccdf71

File tree

1 file changed

+2
-2
lines changed
  • Source/Orts.Simulation/Simulation/RollingStocks

1 file changed

+2
-2
lines changed

Source/Orts.Simulation/Simulation/RollingStocks/TrainCar.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,7 @@ public Direction Direction
598598
public float FrictionBrakeBlendingMaxForceN; // This is the maximum force for the friction barke when it is blended with the dynamic brake
599599

600600
public bool CogWheelFitted = false;
601+
bool isRackRailway = false;
601602

602603
// Sum of all the forces acting on a Traincar in the direction of driving.
603604
// MotiveForceN and GravityForceN act to accelerate the train. The others act to brake the train.
@@ -1102,7 +1103,7 @@ public virtual void UpdateBrakeSlideCalculation()
11021103

11031104
// Only apply slide, and advanced brake friction, if advanced adhesion is selected, simplecontrolphysics is not set, and it is a Player train
11041105
// Rack stock with cog wheel fitted will not skid
1105-
if (Simulator.UseAdvancedAdhesion && !Simulator.Settings.SimpleControlPhysics && IsPlayerTrain && !CogWheelFitted)
1106+
if (Simulator.UseAdvancedAdhesion && !Simulator.Settings.SimpleControlPhysics && IsPlayerTrain && !(CogWheelFitted && isRackRailway))
11061107
{
11071108

11081109
// ************ Check if diesel or electric - assumed already be cover by advanced adhesion model *********
@@ -2966,7 +2967,6 @@ internal void UpdatedTraveler(Traveller traveler, float elapsedTimeS, float dist
29662967

29672968
if (this is MSTSWagon wagon)
29682969
{
2969-
bool isRackRailway = false;
29702970
var thisSection = traveler.GetCurrentSection();
29712971

29722972
if (thisSection != null && Simulator.TSectionDat.TrackShapes.ContainsKey(thisSection.ShapeIndex))

0 commit comments

Comments
 (0)