File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Source/RunActivity/Viewer3D Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -292,8 +292,8 @@ bool UpdateState()
292
292
bool locomotiveFlipped = leadLocomotiveCar != null && leadLocomotiveCar . Flipped ;
293
293
bool locomotiveReverseCab = leadLocomotive != null && leadLocomotive . UsingRearCab ;
294
294
bool newCarIsReversed = Car . Flipped ^ locomotiveFlipped ^ locomotiveReverseCab ;
295
- bool newCarIsFirst = ! Car . Lights . IgnoredConditions [ 1 ] && Car . Train == null || ( locomotiveFlipped ^ locomotiveReverseCab ? Car . Train . LastCar : Car . Train . FirstCar ) == Car ;
296
- bool newCarIsLast = ! Car . Lights . IgnoredConditions [ 1 ] && Car . Train == null || ( locomotiveFlipped ^ locomotiveReverseCab ? Car . Train . FirstCar : Car . Train . LastCar ) == Car ;
295
+ bool newCarIsFirst = ! Car . Lights . IgnoredConditions [ 1 ] && ( locomotiveFlipped ^ locomotiveReverseCab ? Car . Train ? . LastCar : Car . Train ? . FirstCar ) == Car ;
296
+ bool newCarIsLast = ! Car . Lights . IgnoredConditions [ 1 ] && ( locomotiveFlipped ^ locomotiveReverseCab ? Car . Train ? . FirstCar : Car . Train ? . LastCar ) == Car ;
297
297
// Penalty
298
298
bool newPenalty = ! Car . Lights . IgnoredConditions [ 2 ] && leadLocomotive != null && leadLocomotive . TrainBrakeController . EmergencyBraking ;
299
299
// Control
You can’t perform that action at this time.
0 commit comments