Skip to content

Commit a6fa9ee

Browse files
committed
Automatic merge of T1.6-rc2-41-gacd714487 and 9 pull requests
- Pull request #1086 at e10390b: Add Settings Exporter tool (copy settings to INI, etc) - Pull request #1091 at 35f0051: Automatic speed control - Pull request #1107 at f5eb3dc: Fix DPMode when last remote is moved to front. - Pull request #1108 at 343c792: Fix Horn, Bell, and MU light conditions on AI trains - Pull request #1109 at 0190043: Fix Erroneous Detection of Departure Before Passenger Boarding Completed - Pull request #1110 at 387388e: Fix Activity Runner persists after loading exception - Pull request #1082 at 5845a1a: Allow variable water level in glass gauge - Pull request #1104 at dc2a907: Handle simple adhesion within the axle module - Pull request #1081 at 689494b: Brake cuts power unification
11 parents dbe4a57 + acd7144 + e10390b + 35f0051 + f5eb3dc + 343c792 + 0190043 + 387388e + 5845a1a + dc2a907 + 689494b commit a6fa9ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Source/RunActivity/Viewer3D/Lights.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ bool UpdateState()
347347
bool newLeftDoorOpen = !Car.Lights.IgnoredConditions[11] && Car.Train?.DoorState(DoorSide.Left) != DoorState.Closed;
348348
bool newRightDoorOpen = !Car.Lights.IgnoredConditions[11] && Car.Train?.DoorState(DoorSide.Right) != DoorState.Closed;
349349
// AI trains don't have a lead locomotive, but the upcoming lighting calculations want a lead locomotive, try to determine a lead locomotive to use
350-
if (leadLocomotive == null)
350+
if (leadLocomotive == null && Car.Train != null)
351351
{
352352
// If first car is flipped, the 'lead' vehicle is actually at the rear
353353
if (Car.Train.FirstCar.Flipped && Car.Train.LastCar is MSTSLocomotive)

0 commit comments

Comments
 (0)