Skip to content

Commit aa40f6c

Browse files
committed
Automatic merge of T1.5.1-1288-g58b2418aa6 and 13 pull requests
- Pull request #839 at d00beb9: First phase of https://blueprints.launchpad.net/or/+spec/additional-cruise-control-parameters - Pull request #892 at 1f5ba4c: Signal Function OPP_SIG_ID_TRAINPATH - Pull request #952 at 8347095: Investigation - Pulsing graphics - Pull request #953 at a519452: Fix Lights Crash on Corrupt Shapes - Pull request #954 at e4ba0d7: Multiple Track Profiles & Superelevation Rewrite - Pull request #972 at e90a2aa: On Map window color changed switch or signal is not changed - Pull request #981 at 10d297f: Multiple type trainset lightglows - Pull request #982 at efcf19c: WEB based Switch Panel enhancement: Alerter - Pull request #984 at 0f8122e: Player train switching for timetable mode - Pull request #986 at 5d7e692: Fix: The TrainCarOperations window does not resize correctly. - Pull request #987 at 232e8fb: fix: Temporary workaround for building with NET 5+ - Pull request #900 at c27f32d: DMI updates - Pull request #876 at f92de76: docs: add source for documents previously on website to source Documentation folder
15 parents a773887 + 58b2418 + d00beb9 + 1f5ba4c + 8347095 + a519452 + e4ba0d7 + e90a2aa + 10d297f + efcf19c + 0f8122e + 5d7e692 + 232e8fb + c27f32d + f92de76 commit aa40f6c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Source/RunActivity/Viewer3D/SuperElevation.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -722,13 +722,17 @@ public override ShapePrimitive BuildPrimitive(Viewer viewer, int iLOD, int iLODI
722722
SuperElevationRoll = DetermineRotation();
723723

724724
Matrix displacement;
725+
Matrix rotation;
725726
float totLength;
726727

727728
if (DTrackData.IsCurved == 0)
728729
displacement = LinearGen(out totLength);
729730
else
730731
displacement = CircArcGen(out totLength);
731732

733+
rotation = displacement;
734+
rotation.Translation = Vector3.Zero;
735+
732736
foreach (Polyline pl in lodItem.Polylines)
733737
{
734738
uint plv = 0; // Polyline vertex index
@@ -764,7 +768,7 @@ public override ShapePrimitive BuildPrimitive(Viewer viewer, int iLOD, int iLODI
764768
// Move vertex to proper location in 3D space
765769
VertexList[VertexIndex].Position = Vector3.Transform(p, displacement);
766770
VertexList[VertexIndex].TextureCoordinate = v.TexCoord + pl.DeltaTexCoord * totLength;
767-
VertexList[VertexIndex].Normal = v.Normal;
771+
VertexList[VertexIndex].Normal = Vector3.Transform(v.Normal, rotation);
768772

769773
if (plv > 0 && VertexIndex > stride)
770774
{

0 commit comments

Comments
 (0)