Skip to content

Commit 0b8f788

Browse files
committed
Automatic merge of T1.5.1-535-g2f57132ee and 10 pull requests
- Pull request #757 at 98dd1a7: Unify RailDriver code implementations - Pull request #821 at cc3af66: Adds suppression of safety valves - Pull request #831 at 61bbf43: poor mans switch panel on tablet - Pull request #839 at d00beb9: First phase of https://blueprints.launchpad.net/or/+spec/additional-cruise-control-parameters - Pull request #841 at 410a585: https://blueprints.launchpad.net/or/+spec/animating-trainset-windows - Pull request #853 at a9760ec: Notify out of focus - Pull request #855 at b39e5d8: Adds new route from TrainSimulations - Pull request #856 at ce66076: Add Alternate Syntax for Confusing Tokens - Pull request #857 at 7931a52: Adding Air Flow Meters - Pull request #858 at bbaeeba: Fix wheel animation problems
12 parents 28bc4b7 + 2f57132 + 98dd1a7 + cc3af66 + 61bbf43 + d00beb9 + 410a585 + a9760ec + b39e5d8 + ce66076 + 7931a52 + bbaeeba commit 0b8f788

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2029,6 +2029,7 @@ public override void Update(float elapsedClockSeconds)
20292029

20302030
AntiSlip = true; // Always set AI trains to AntiSlip
20312031
SimpleAdhesion(); // Simple adhesion model used for AI trains
2032+
AdvancedAdhesionModel = false;
20322033
if (Train.IsActualPlayerTrain) FilteredMotiveForceN = CurrentFilter.Filter(MotiveForceN, elapsedClockSeconds);
20332034
WheelSpeedMpS = Flipped ? -AbsSpeedMpS : AbsSpeedMpS; //make the wheels go round
20342035
break;

Source/RunActivity/Viewer3D/RollingStock/MSTSWagonViewer.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -767,9 +767,8 @@ private void UpdateAnimation(RenderFrame frame, ElapsedTime elapsedTime)
767767
float AnimationWheelRadiusM = MSTSWagon.WheelRadiusM; // Radius of non driven wheels
768768
float AnimationDriveWheelRadiusM = MSTSWagon.DriverWheelRadiusM; // Radius of driven wheels
769769

770-
if (MSTSWagon.IsDriveable && MSTSWagon.Simulator.UseAdvancedAdhesion && !MSTSWagon.Simulator.Settings.SimpleControlPhysics)
770+
if (MSTSWagon is MSTSLocomotive loco && loco.AdvancedAdhesionModel)
771771
{
772-
var loco = MSTSWagon as MSTSLocomotive;
773772
//TODO: next code line has been modified to flip trainset physics in order to get viewing direction coincident with loco direction when using rear cab.
774773
// To achieve the same result with other means, without flipping trainset physics, the line should be changed as follows:
775774
// distanceTravelledM = MSTSWagon.WheelSpeedMpS * elapsedTime.ClockSeconds;

0 commit comments

Comments
 (0)