Skip to content

Commit 88e16bf

Browse files
committed
Automatic merge of T1.6-106-gdcc176472 and 13 pull requests
- Pull request #1156 at f46d5f2: Fix incorrectly disabled options in train operations window - Pull request #1091 at 492795a: Automatic speed control - Pull request #1120 at ba3c47f: Automatically Calculate Friction Values if Missing - Pull request #1121 at 91d2d26: Manually Override Articulation - Pull request #1124 at e241a0d: Built-in PBL2 brake controller - Pull request #1157 at 39cd994: Dynamic brake authorization by TCS - Pull request #1159 at 48c9a63: Skip OR warnings about TSRE-specific token Ruler - Pull request #1161 at 6cfe4e2: Fix string trim in .ini files - Pull request #1162 at 2516cce: specifies precedence of DDS over ACE - Pull request #1163 at 2f9e292: Fix: Crash when using Camera 8 and F9. - Pull request #1082 at 5845a1a: Allow variable water level in glass gauge - Pull request #1128 at 086d502: Particle Emitter Overhaul - Pull request #1160 at 9dc6b3b: Route Based TTrack Sounds
15 parents d7d78dc + dcc1764 + f46d5f2 + 492795a + ba3c47f + 91d2d26 + e241a0d + 39cd994 + 48c9a63 + 6cfe4e2 + 2516cce + 2f9e292 + 5845a1a + 086d502 + 9dc6b3b commit 88e16bf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Source/RunActivity/Viewer3D/Popups/TrainCarOperationsWindow.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ public override void PrepareFrame(ElapsedTime elapsedTime, bool updateFull)
644644
}
645645

646646
// Restore LastCarIDSelected (F9) after returning from different camera views
647-
if (CarIdClicked && Owner.Viewer.Camera.AttachedCar.CarID != LastCarIDSelected)
647+
if (CarIdClicked && Owner.Viewer.Camera.AttachedCar != null && Owner.Viewer.Camera.AttachedCar.CarID != LastCarIDSelected)
648648
{
649649
trainCarViewer.CurrentCarID = LastCarIDSelected;
650650
trainCarViewer.CarPosition = CarPosition = PlayerTrain.Cars.TakeWhile(x => x.CarID != LastCarIDSelected).Count();
@@ -788,7 +788,7 @@ public FormationReversed(Viewer viewer, Train PlayerTrain)
788788
Viewer = viewer;
789789
TrainCar = Viewer.TrainCarOperationsWindow;
790790
TrainCarViewer = Viewer.TrainCarOperationsViewerWindow;
791-
var currentCameraCarID = Viewer.Camera.AttachedCar.CarID;
791+
var currentCameraCarID = Viewer.Camera.AttachedCar != null ? Viewer.Camera.AttachedCar.CarID : TrainCar.LastCarIDSelected;
792792

793793
TrainCarViewer.CurrentCarID = TrainCar.LastCarIDSelected;
794794
TrainCarViewer.CarPosition = TrainCar.CarPosition = PlayerTrain.Cars.TakeWhile(x => x.CarID != TrainCar.LastCarIDSelected).Count();

0 commit comments

Comments
 (0)