Skip to content

Commit d28edbc

Browse files
committed
Automatic merge of T1.5.1-411-g51d4cd969 and 19 pull requests
- Pull request #570 at de7a14f: 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 #802 at 4d198e4: Added support for activity location events to the TrackViewer - Pull request #803 at 7157e08: Various adjustments to steam adhesion - Pull request #813 at 7fdad38: Refactored garbage generators - Pull request #815 at a5cc165: chore: Add GitHub automatic release notes configuration - Pull request #818 at 0d2162a: Allow independent drive axles for locomotives - Pull request #821 at e0fa5a8: Adds suppression of safety valves - Pull request #823 at 5e1c03b: Select track sound volume percent retained in .eng and .wag files - Pull request #824 at f16ebed: Update Readme.md - Pull request #825 at 29ed427: 2D Cabview controls for side viewpoints https://blueprints.launchpad.net/or/+spec/2dcabview-controls-for-side-views - Pull request #829 at 434af02: Improvements for air brakes #3 - Emergency valves - Pull request #830 at 280ee74: Electric locomotive hot start - Pull request #831 at c8927a4: preliminary version switchpanel on tablet - Pull request #832 at bb8941f: Fix Cruise Control together with Train Brake - Pull request #833 at 01aaca7: Implement brake relay valve - Pull request #834 at 7a98eca: Replaces email service with FormSpark - Pull request #835 at 8b4e134: Correct Brake Shoe Force Calculation
21 parents 912861f + 51d4cd9 + de7a14f + d9d75f4 + dc03850 + 4d198e4 + 7157e08 + 7fdad38 + a5cc165 + 0d2162a + e0fa5a8 + 5e1c03b + f16ebed + 29ed427 + 434af02 + 280ee74 + c8927a4 + bb8941f + 01aaca7 + 7a98eca + 8b4e134 commit d28edbc

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ public class MSTSWagon : TrainCar
8787
public bool GenericItem1;
8888
public bool GenericItem2;
8989

90-
Interpolator BrakeShoeFrictionFactor; // Factor of friction for wagon brake shoes
9190
const float WaterLBpUKG = 10.0f; // lbs of water in 1 gal (uk)
9291
float TempMassDiffRatio;
9392

@@ -597,8 +596,9 @@ public virtual void LoadFromWagFile(string wagFilePath)
597596

598597
// Initialise key wagon parameters
599598
MassKG = InitialMassKG;
599+
600600
MaxHandbrakeForceN = InitialMaxHandbrakeForceN;
601-
if (MaxBrakeShoeForceN != 0)
601+
if (MaxBrakeShoeForceN != 0 && BrakeShoeFrictionFactor != null)
602602
{
603603
MaxBrakeForceN = MaxBrakeShoeForceN;
604604
}

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ public abstract class TrainCar
139139
0.0f, 31.0f
140140
};
141141

142+
public Interpolator BrakeShoeFrictionFactor; // Factor of friction for wagon brake shoes
143+
142144
public static Interpolator SteamHeatBoilerWaterUsageGalukpH()
143145
{
144146
return new Interpolator(SteamUsageLbpH, WaterUsageGalukpH);
@@ -968,7 +970,7 @@ public virtual void UpdateBrakeSlideCalculation()
968970
//For a user defined case the base value is the zero speed value from the curve entered by the user.
969971
// For a "default" case where no user data has been added to the WAG file, the base friction value has been assumed to be 0.2, thus maximum value of 20% applied.
970972

971-
if (UserFriction != 0 && MaxBrakeShoeForceN != 0) // Assume user has set up brakeshoe force and brakeshoe CoF
973+
if (BrakeShoeFrictionFactor != null && MaxBrakeShoeForceN != 0) // Assume user has set up brakeshoe force and brakeshoe CoF
972974
{
973975
BrakeShoeCoefficientFrictionAdjFactor = UserFriction * AdhesionMultiplier;
974976
BrakeShoeRetardCoefficientFrictionAdjFactor = BrakeShoeCoefficientFrictionAdjFactor;

0 commit comments

Comments
 (0)