Skip to content

Commit 3e68613

Browse files
committed
Automatic merge of T1.5.1-1606-gf9e80b97d and 11 pull requests
- Pull request #900 at b54024b: DMI in 3D cab + two more dials - Pull request #892 at 1f5ba4c: Signal Function OPP_SIG_ID_TRAINPATH - Pull request #961 at ffccb2e: Improvements for Power Supplies - Pull request #1015 at 14c132b: Enhancements for EP brakes - Pull request #1026 at 6a89a97: Fix for Multiplayer: remote trains chuff can't be heard https://bugs.launchpad.net/or/+bug/2092771 - Pull request #1029 at 31fd7d2: Superelevation Follow Up Fixes - Pull request #1031 at 34aa23a: Multiplayer Server, forked from Open Rails Ultimate; blueprint https://blueprints.launchpad.net/or/+spec/multiplayer-server - Pull request #1047 at eb8027b: Docs: adds translation docs - Pull request #1058 at 626ebed: Refactor notification parameters - Pull request #1055 at d1a56b3: Route Based TTrack Sounds - Pull request #896 at f1681df: First implementation of https://blueprints.launchpad.net/or/+spec/specific-sounds-for-ai-trains
13 parents 35582ce + f9e80b9 + b54024b + 1f5ba4c + ffccb2e + 14c132b + 6a89a97 + 31fd7d2 + 34aa23a + eb8027b + 626ebed + d1a56b3 + f1681df commit 3e68613

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

Source/RunActivity/Viewer3D/Viewer.cs

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1445,15 +1445,15 @@ void HandleUserInput(ElapsedTime elapsedTime)
14451445
&& controlRenderer is ICabViewMouseControlRenderer mouseRenderer && mouseRenderer.IsMouseWithin()
14461446
&& (controlRenderer.Control.Screens == null || controlRenderer.Control.Screens.Count == 0 || controlRenderer.Control.Screens[0] == "all"
14471447
|| controlRenderer.Control.Screens.Contains(locoViewer._CabRenderer.ActiveScreen[controlRenderer.Control.Display])))
1448-
{
1449-
if (UserInput.IsMouseLeftButtonPressed)
1448+
{
1449+
if (UserInput.IsMouseLeftButtonPressed)
14501450
MouseChangingControl = mouseRenderer;
14511451
else if (MouseChangingControl == null && RenderProcess.IsMouseVisible)
1452-
MousePickedControl = mouseRenderer;
1453-
break;
1454-
}
1455-
}
1456-
}
1452+
MousePickedControl = mouseRenderer;
1453+
break;
1454+
}
1455+
}
1456+
}
14571457
else if (Camera is ThreeDimCabCamera && locoViewer._has3DCabRenderer)
14581458
{
14591459
var trainCarShape = locoViewer.ThreeDimentionCabViewer.TrainCarShape;
@@ -1466,31 +1466,31 @@ void HandleUserInput(ElapsedTime elapsedTime)
14661466
controlRenderer.Control.Screens.Contains(locoViewer.ThreeDimentionCabRenderer.ActiveScreen[controlRenderer.Control.Display])))
14671467
{
14681468
foreach (var targetNode in animatedPart.MatrixIndexes)
1469-
{
1469+
{
14701470
if (!trainCarShape.SharedShape.StoredResultMatrixes.TryGetValue(targetNode, out var matrix))
1471-
continue;
1472-
var matrixWorldLocation = trainCarShape.Location.WorldLocation;
1473-
matrixWorldLocation.Location.X = matrix.Translation.X;
1474-
matrixWorldLocation.Location.Y = matrix.Translation.Y;
1475-
matrixWorldLocation.Location.Z = -matrix.Translation.Z;
1476-
Vector3 xnaCenter = Camera.XnaLocation(matrixWorldLocation);
1477-
float d = ORTSMath.LineSegmentDistanceSq(xnaCenter, NearPoint, FarPoint);
1478-
if (bestD > d)
1479-
{
1480-
bestD = d;
1471+
continue;
1472+
var matrixWorldLocation = trainCarShape.Location.WorldLocation;
1473+
matrixWorldLocation.Location.X = matrix.Translation.X;
1474+
matrixWorldLocation.Location.Y = matrix.Translation.Y;
1475+
matrixWorldLocation.Location.Z = -matrix.Translation.Z;
1476+
Vector3 xnaCenter = Camera.XnaLocation(matrixWorldLocation);
1477+
float d = ORTSMath.LineSegmentDistanceSq(xnaCenter, NearPoint, FarPoint);
1478+
if (bestD > d)
1479+
{
1480+
bestD = d;
14811481
if (UserInput.IsMouseLeftButtonPressed)
14821482
MouseChangingControl = mouseRenderer;
14831483
else if (MouseChangingControl == null && RenderProcess.IsMouseVisible)
14841484
MousePickedControl = mouseRenderer;
1485-
}
14861485
}
14871486
}
14881487
}
14891488
}
1489+
}
14901490
else
1491-
{
1492-
ActualCursor = Cursors.Default;
1493-
}
1491+
{
1492+
ActualCursor = Cursors.Default;
1493+
}
14941494
}
14951495

14961496
if (MousePickedControl != null & MousePickedControl != OldMousePickedControl)
@@ -1501,8 +1501,8 @@ void HandleUserInput(ElapsedTime elapsedTime)
15011501
if (UserInput.IsMouseWheelChanged)
15021502
MousePickedControl?.HandleUserInput();
15031503

1504-
OldMousePickedControl = MousePickedControl;
1505-
MousePickedControl = null;
1504+
OldMousePickedControl = MousePickedControl;
1505+
MousePickedControl = null;
15061506

15071507
MouseChangingControl?.HandleUserInput();
15081508
if (UserInput.IsMouseLeftButtonReleased)

0 commit comments

Comments
 (0)