Skip to content

Commit 674df16

Browse files
committed
Automatic merge of T1.5.1-1076-g60df6ba81e and 21 pull requests
- Pull request #799 at dfc715e: Consolidated wind simulation - Pull request #839 at d00beb9: First phase of https://blueprints.launchpad.net/or/+spec/additional-cruise-control-parameters - Pull request #876 at f92de76: docs: add source for documents previously on website to source Documentation folder - Pull request #882 at 8f695a4: Blueprint/train car operations UI window - Pull request #885 at e267870: feat: Add notifications to Menu - Pull request #891 at 9a1d6b2: Auto save - Pull request #892 at 1f5ba4c: Signal Function OPP_SIG_ID_TRAINPATH - Pull request #896 at 5866028: First implementation of https://blueprints.launchpad.net/or/+spec/specific-sounds-for-ai-trains - Pull request #900 at c27f32d: DMI updates - Pull request #903 at 3e390b8: Downloading route content (Github, zip) - Pull request #922 at a3bc9e7: Autopilot for timetable mode - Pull request #946 at 91a03af: Advanced track sounds - Pull request #952 at 8347095: Investigation - Pulsing graphics - Pull request #953 at a519452: Fix Lights Crash on Corrupt Shapes - Pull request #954 at 84c2f4b: Add Support for Multiple Track Profiles - Pull request #959 at 2452cb0: Fix TrackViewer crash on big zoom value - Pull request #962 at 46d0472: Fix pantographs on unpowered cars - Pull request #964 at b11c894: fix: Warning CA1417: Do not use the 'OutAttribute' for string parameter - Pull request #965 at 7554f02: style: Renormalize line endings - Pull request #966 at 6353e03: fix: Warning CS0618: 'string.Copy(string)' is obsolete - Pull request #968 at 8cbc503: Initial build of adding track section identifier for rack railway
23 parents ffae563 + 60df6ba + dfc715e + d00beb9 + f92de76 + 8f695a4 + e267870 + 9a1d6b2 + 1f5ba4c + 5866028 + c27f32d + 3e390b8 + a3bc9e7 + 91a03af + 8347095 + a519452 + 84c2f4b + 2452cb0 + 46d0472 + b11c894 + 7554f02 + 6353e03 + 8cbc503 commit 674df16

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1595,6 +1595,11 @@ public override void Initialize()
15951595
Trace.TraceInformation("LocomotiveRailDriveType set to Default value of {0}", LocomotiveRailDriveType);
15961596
}
15971597

1598+
if (LocomotiveRailDriveType == LocomotiveRailDriveTypes.Rack)
1599+
{
1600+
CogWheelFitted = true;
1601+
}
1602+
15981603
SteamHeatPressureToTemperaturePSItoF = SteamTable.SteamHeatPressureToTemperatureInterpolatorPSItoF();
15991604
SteamDensityPSItoLBpFT3 = SteamTable.SteamDensityInterpolatorPSItoLBpFT3();
16001605
SteamHeatPSItoBTUpLB = SteamTable.SteamHeatInterpolatorPSItoBTUpLB();
@@ -1616,7 +1621,7 @@ public override void Initialize()
16161621
}
16171622

16181623
// Check if current sander has been set
1619-
if (CurrentTrackSandBoxCapacityM3 == 0 )
1624+
if (CurrentTrackSandBoxCapacityM3 == 0)
16201625
{
16211626
CurrentTrackSandBoxCapacityM3 = MaxTrackSandBoxCapacityM3;
16221627
}
@@ -1626,7 +1631,7 @@ public override void Initialize()
16261631
{
16271632
if (MSTSLocoNumDrvWheels != 0 && MSTSLocoNumDrvWheels < 7)
16281633
{
1629-
LocoNumDrvAxles = (int) MSTSLocoNumDrvWheels;
1634+
LocoNumDrvAxles = (int)MSTSLocoNumDrvWheels;
16301635
}
16311636
else
16321637
{

Source/Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ public enum WindowState
101101
public bool IsDavisFriction = true; // Default to new Davis type friction
102102
public bool IsBelowMergeSpeed = true; // set indicator for low speed operation as per given speed
103103

104-
105104
public bool GenericItem1;
106105
public bool GenericItem2;
107106

@@ -1546,7 +1545,9 @@ public virtual void Parse(string lowercasetoken, STFReader stf)
15461545
Couplers[CouplerCountLocation].Rigid = stf.ReadBoolBlock(true);
15471546
break;
15481547

1549-
1548+
case "wagon(ortscogwheel":
1549+
CogWheelFitted = stf.ReadBoolBlock(false);
1550+
break;
15501551

15511552
case "wagon(adheasion":
15521553
stf.MustMatch("(");
@@ -1752,6 +1753,7 @@ public virtual void Copy(MSTSWagon copy)
17521753
Curtius_KnifflerB = copy.Curtius_KnifflerB;
17531754
Curtius_KnifflerC = copy.Curtius_KnifflerC;
17541755
AdhesionK = copy.AdhesionK;
1756+
CogWheelFitted = copy.CogWheelFitted;
17551757
AxleInertiaKgm2 = copy.AxleInertiaKgm2;
17561758
SlipWarningThresholdPercent = copy.SlipWarningThresholdPercent;
17571759
Lights = copy.Lights;

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,6 +600,8 @@ public Direction Direction
600600
public float BrakeShoeForceN;
601601
public float FrictionBrakeBlendingMaxForceN; // This is the maximum force for the friction barke when it is blended with the dynamic brake
602602

603+
public bool CogWheelFitted = false;
604+
603605
// Sum of all the forces acting on a Traincar in the direction of driving.
604606
// MotiveForceN and GravityForceN act to accelerate the train. The others act to brake the train.
605607
public float TotalForceN; //
@@ -1107,7 +1109,8 @@ public virtual void UpdateBrakeSlideCalculation()
11071109
{
11081110

11091111
// Only apply slide, and advanced brake friction, if advanced adhesion is selected, simplecontrolphysics is not set, and it is a Player train
1110-
if (Simulator.UseAdvancedAdhesion && !Simulator.Settings.SimpleControlPhysics && IsPlayerTrain)
1112+
// Rack stock with cog wheel fitted will not skid
1113+
if (Simulator.UseAdvancedAdhesion && !Simulator.Settings.SimpleControlPhysics && IsPlayerTrain && !CogWheelFitted)
11111114
{
11121115

11131116
// ************ Check if diesel or electric - assumed already be cover by advanced adhesion model *********

0 commit comments

Comments
 (0)