Skip to content

Commit 01ad93c

Browse files
committed
Automatic merge of T1.5.1-925-g1c557094e and 19 pull requests
- Pull request #570 at 3539862: Experimental glTF 2.0 support with PBR lighting - 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 3ca0eb1: Blueprint/train car operations UI window - Pull request #885 at 0a956f5: 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 7af1f91: 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 cc1b5b6: 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 7bce293: AI Train Power Supply/Lights Fix - Pull request #929 at a406a69: Add support for common circuit breaker variants - Pull request #930 at 42398f4: Further enhancements for duplex locoomotive - Pull request #932 at 9bdb074: Changed matrix's to matrices
21 parents edf4ea9 + 1c55709 + 3539862 + dfc715e + d00beb9 + f92de76 + 3ca0eb1 + 0a956f5 + 6c0785b + 1f5ba4c + 5866028 + 7af1f91 + f7b85e4 + 26cc6a8 + cc1b5b6 + 6c2c3cd + e3b1688 + 7bce293 + a406a69 + 42398f4 + 9bdb074 commit 01ad93c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Source/RunActivity/Viewer3D/Precipitation.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// COPYRIGHT 2009 - 2023 by the Open Rails project.
1+
// COPYRIGHT 2009 - 2023 by the Open Rails project.
22
//
33
// This file is part of Open Rails.
44
//
@@ -261,7 +261,7 @@ public void Update(float currentTime, ElapsedTime elapsedTime, float particlesPe
261261
var tiles = viewer.Tiles;
262262
var scenery = viewer.World.Scenery;
263263
var worldLocation = viewer.Camera.CameraWorldLocation;
264-
var particleDirection2D = viewer.Simulator.Weather.WindInstantaneousDirection * viewer.Simulator.Weather.WindInstantaneousSpeedMpS;
264+
var particleDirection2D = viewer.World.WeatherControl.PrecipitationSlewMpS;
265265
var particleDirection3D = new Vector3(particleDirection2D.X, 0, particleDirection2D.Y);
266266

267267
if (TimeParticlesLastEmitted == 0)

Source/RunActivity/Viewer3D/Weather.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ public class WeatherControl
4848
public readonly List<SoundSourceBase> WeatherSounds = new List<SoundSourceBase>();
4949

5050
public Vector4 CloudScalePosition { get => new Vector4(CloudScale.X, CloudScale.Y, CloudPositionM.X / SkyPrimitive.RadiusM, CloudPositionM.Y / SkyPrimitive.RadiusM); }
51+
public Vector2 PrecipitationSlewMpS { get; set; }
5152

5253
Vector2 CloudScale;
5354
Vector2 CloudPositionM;
@@ -240,6 +241,7 @@ private void UpdateWind(ElapsedTime elapsedTime)
240241

241242
WorldLocation.GetDistance(CameraWorldLocation, Viewer.Camera.CameraWorldLocation).Deconstruct(out var x, out var _, out var y);
242243
CloudPositionM += elapsedTime.ClockSeconds * Weather.WindAverageDirection * Weather.WindAverageSpeedMpS - new Vector2(x, -y);
244+
PrecipitationSlewMpS = Weather.WindInstantaneousDirection * Weather.WindInstantaneousSpeedMpS - new Vector2(x, -y) / elapsedTime.ClockSeconds;
243245
CameraWorldLocation = Viewer.Camera.CameraWorldLocation;
244246
}
245247

0 commit comments

Comments
 (0)