Skip to content

Commit bd05999

Browse files
committed
Automatic merge of T1.5.1-922-g0a17d985e and 16 pull requests
- Pull request #570 at 3539862: Experimental glTF 2.0 support with PBR lighting - 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 3ca0eb1: Blueprint/train car operations UI window - Pull request #885 at 42092cb: feat: Add notifications to Menu - Pull request #886 at 6c0785b: Scene viewer extension to TrackViewer - 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 #903 at 29f3d1a: Downloading route content (Github, zip) - Pull request #912 at f7b85e4: New Triple Valve Features Vol. 2 - Pull request #919 at 26cc6a8: Added mouse wheel support for controls which can be moved by pressing t… - Pull request #923 at 5489025: Add curve squeal to route - Pull request #924 at 6c2c3cd: Default Asset Improvements - Pull request #925 at e3b1688: Fix brakeshoe force bug - Pull request #927 at cf687d4: AI Train Power Supply/Lights Fix - Pull request #928 at 1f23512: Fix Missing Initializations From Copy in MSTSLocomotive
18 parents 080e38c + 0a17d98 + 3539862 + d00beb9 + f92de76 + 3ca0eb1 + 42092cb + 6c0785b + 1f5ba4c + 5866028 + 29f3d1a + f7b85e4 + 26cc6a8 + 5489025 + 6c2c3cd + e3b1688 + cf687d4 + 1f23512 commit bd05999

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -583,6 +583,9 @@ public Direction Direction
583583
protected SmoothedData CurveForceFilter = new SmoothedData(0.75f);
584584
public float CurveForceNFiltered;
585585

586+
protected SmoothedData CurveSquealAoAmRadFilter = new SmoothedData(0.75f);
587+
public float CurveSquealAoAmRadFiltered;
588+
586589
public float TunnelForceN; // Resistive force due to tunnel, in Newtons
587590
public float FrictionForceN; // in Newtons ( kg.m/s^2 ) unsigned, includes effects of curvature
588591
public float BrakeForceN; // current braking force applied to slow train (Newtons) - will be impacted by wheel/rail friction
@@ -982,6 +985,9 @@ public virtual void Update(float elapsedClockSeconds)
982985

983986
AngleOfAttackmRad = GetAngleofAttackmRad();
984987

988+
CurveSquealAoAmRadFilter.Update(elapsedClockSeconds, AngleOfAttackmRad);
989+
CurveSquealAoAmRadFiltered = CurveSquealAoAmRadFilter.SmoothedValue;
990+
985991
UpdateCurveSpeedLimit(); // call this first as it will provide inputs for the curve force.
986992
UpdateCurveForce(elapsedClockSeconds);
987993
UpdateTunnelForce();
@@ -2277,6 +2283,7 @@ public virtual void Save(BinaryWriter outf)
22772283
outf.Write(CarHeatCurrentCompartmentHeatJ);
22782284
outf.Write(CarSteamHeatMainPipeSteamPressurePSI);
22792285
outf.Write(CarHeatCompartmentHeaterOn);
2286+
outf.Write(CurveSquealAoAmRadFiltered);
22802287
}
22812288

22822289
// Game restore
@@ -2301,6 +2308,8 @@ public virtual void Restore(BinaryReader inf)
23012308
CarSteamHeatMainPipeSteamPressurePSI = inf.ReadSingle();
23022309
CarHeatCompartmentHeaterOn = inf.ReadBoolean();
23032310
FreightAnimations?.LoadDataList?.Clear();
2311+
CurveSquealAoAmRadFiltered = inf.ReadSingle();
2312+
CurveSquealAoAmRadFilter.ForceSmoothValue(CurveSquealAoAmRadFiltered);
23042313
}
23052314

23062315
//================================================================================================//

Source/RunActivity/Viewer3D/Sound.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1515,7 +1515,7 @@ private float ReadValue(Orts.Formats.Msts.VolumeCurve.Controls control, MSTSWago
15151515
case Orts.Formats.Msts.VolumeCurve.Controls.Variable3Controlled: return car.Variable3;
15161516
case Orts.Formats.Msts.VolumeCurve.Controls.BrakeCylControlled: return car.BrakeSystem.GetCylPressurePSI();
15171517
case Orts.Formats.Msts.VolumeCurve.Controls.CurveForceControlled: return car.CurveForceNFiltered;
1518-
case Orts.Formats.Msts.VolumeCurve.Controls.AngleofAttackControlled: return car.AngleOfAttackmRad;
1518+
case Orts.Formats.Msts.VolumeCurve.Controls.AngleofAttackControlled: return car.CurveSquealAoAmRadFiltered;
15191519
case Orts.Formats.Msts.VolumeCurve.Controls.CarFrictionControlled: return car.Train.WagonCoefficientFriction;
15201520
default: return 0;
15211521
}

0 commit comments

Comments
 (0)