Skip to content

Commit 71c1114

Browse files
authored
Merge pull request #745 from cesarBLG/rotate-digits-3dcab
Fix digital displays in rear 3D cab
2 parents 8196a3f + cf5acd2 commit 71c1114

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Source/RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3065,7 +3065,7 @@ public ThreeDimentionCabViewer(Viewer viewer, MSTSLocomotive car, MSTSLocomotive
30653065
if (style != null && style is CabViewDigitalRenderer)//digits?
30663066
{
30673067
//DigitParts.Add(key, new DigitalDisplay(viewer, TrainCarShape, iMatrix, parameter, locoViewer.ThreeDimentionCabRenderer.ControlMap[key]));
3068-
DigitParts3D.Add(key, new ThreeDimCabDigit(viewer, iMatrix, parameter1, parameter2, this.TrainCarShape, locoViewer.ThreeDimentionCabRenderer.ControlMap[key]));
3068+
DigitParts3D.Add(key, new ThreeDimCabDigit(viewer, iMatrix, parameter1, parameter2, this.TrainCarShape, locoViewer.ThreeDimentionCabRenderer.ControlMap[key], Locomotive));
30693069
}
30703070
else if (style != null && style is CabViewGaugeRenderer)
30713071
{
@@ -3290,7 +3290,7 @@ public class ThreeDimCabDigit
32903290
Material AlertMaterial;
32913291
float Size;
32923292
string AceFile;
3293-
public ThreeDimCabDigit(Viewer viewer, int iMatrix, string size, string aceFile, PoseableShape trainCarShape, CabViewControlRenderer c)
3293+
public ThreeDimCabDigit(Viewer viewer, int iMatrix, string size, string aceFile, PoseableShape trainCarShape, CabViewControlRenderer c, MSTSLocomotive locomotive)
32943294
{
32953295

32963296
Size = int.Parse(size) * 0.001f;//input size is in mm
@@ -3318,7 +3318,7 @@ public ThreeDimCabDigit(Viewer viewer, int iMatrix, string size, string aceFile,
33183318

33193319
//start position is the center of the text
33203320
var start = new Vector3(0, 0, 0);
3321-
var rotation = 0;
3321+
var rotation = locomotive.UsingRearCab ? (float)Math.PI : 0;
33223322

33233323
//find the left-most of text
33243324
Vector3 offset;

0 commit comments

Comments
 (0)