Skip to content

Commit

Permalink
Disable penalty brake lights on AI trains, doesn't work as intended
Browse files Browse the repository at this point in the history
  • Loading branch information
SteelFill committed May 5, 2024
1 parent 4fd63a3 commit 50378f6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Source/RunActivity/Viewer3D/Lights.cs
Expand Up @@ -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])
Expand Down

0 comments on commit 50378f6

Please sign in to comment.