From 50378f6313706b9423b42beea37f1cdf6be69f3e Mon Sep 17 00:00:00 2001 From: Phillip Schlichting Date: Sun, 5 May 2024 14:26:19 -0500 Subject: [PATCH] Disable penalty brake lights on AI trains, doesn't work as intended --- Source/RunActivity/Viewer3D/Lights.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Source/RunActivity/Viewer3D/Lights.cs b/Source/RunActivity/Viewer3D/Lights.cs index 6ed7dd6de4..4ee20bc936 100644 --- a/Source/RunActivity/Viewer3D/Lights.cs +++ b/Source/RunActivity/Viewer3D/Lights.cs @@ -295,11 +295,13 @@ bool UpdateState() bool newCarIsFirst = !Car.Lights.IgnoredConditions[1] && (locomotiveFlipped ^ locomotiveReverseCab ? Car.Train?.LastCar : Car.Train?.FirstCar) == Car; bool newCarIsLast = !Car.Lights.IgnoredConditions[1] && (locomotiveFlipped ^ locomotiveReverseCab ? Car.Train?.FirstCar : Car.Train?.LastCar) == Car; // Penalty - bool newPenalty = !Car.Lights.IgnoredConditions[2] && leadLocomotive != null && leadLocomotive.TrainBrakeController.EmergencyBraking; + bool newPenalty = !Car.Lights.IgnoredConditions[2] && Car.Train.TrainType != Train.TRAINTYPE.AI + && leadLocomotive != null && leadLocomotive.TrainBrakeController.EmergencyBraking; // Control bool newCarIsPlayer = !Car.Lights.IgnoredConditions[3] && Car.Train != null && (Car.Train == Viewer.PlayerTrain || Car.Train.TrainType == Train.TRAINTYPE.REMOTE); // Service - if a player or AI train, then will considered to be in servie, loose consists will not be considered to be in service. - bool newCarInService = !Car.Lights.IgnoredConditions[4] && Car.Train != null && (Car.Train == Viewer.PlayerTrain || Car.Train.TrainType == Train.TRAINTYPE.REMOTE || Car.Train.TrainType == Train.TRAINTYPE.AI); + bool newCarInService = !Car.Lights.IgnoredConditions[4] && Car.Train != null + && (Car.Train == Viewer.PlayerTrain || Car.Train.TrainType == Train.TRAINTYPE.REMOTE || Car.Train.TrainType == Train.TRAINTYPE.AI); // Time of day bool newIsDay = false; if (!Car.Lights.IgnoredConditions[5])