We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fe901d3 commit a34b857Copy full SHA for a34b857
Source/Orts.Simulation/Simulation/RollingStocks/TrainCar.cs
@@ -2275,8 +2275,9 @@ public bool HasRear3DCab
2275
{
2276
var loco = this as MSTSLocomotive;
2277
var i = (int)CabViewType.Rear;
2278
- if (loco == null || loco.CabView3D == null) return false;
2279
- return (loco.CabView3D.ViewPointList.Count > i);
+ if (loco == null || loco.CabView3D == null || loco.CabView3D.ViewPointList.Count <= i) return false;
+ var cabViewAngle = loco.CabView3D.ViewPointList[i].StartDirection.Y;
2280
+ return ((cabViewAngle >= 90 && cabViewAngle <= 270) || (cabViewAngle <= -90 && cabViewAngle >= -270));
2281
}
2282
2283
0 commit comments