Skip to content

Commit 3daa5aa

Browse files
committed
Keep circuit breaker closed when train autopiloted
1 parent e66b25c commit 3daa5aa

File tree

1 file changed

+2
-2
lines changed
  • Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies

1 file changed

+2
-2
lines changed

Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/CircuitBreaker.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,8 @@ public void InitializeMoving()
164164

165165
public void Update(float elapsedSeconds)
166166
{
167-
if (Locomotive.Train.TrainType == Train.TRAINTYPE.AI && !Locomotive.Train.Autopilot || Locomotive.Train.TrainType == Train.TRAINTYPE.AI_AUTOGENERATE
168-
|| Locomotive.Train.TrainType == Train.TRAINTYPE.AI_PLAYERHOSTING)
167+
if (Locomotive.Train.TrainType == Train.TRAINTYPE.AI || Locomotive.Train.TrainType == Train.TRAINTYPE.AI_AUTOGENERATE
168+
|| Locomotive.Train.TrainType == Train.TRAINTYPE.AI_PLAYERHOSTING || Locomotive.Train.Autopilot)
169169
{
170170
State = CircuitBreakerState.Closed;
171171
}

0 commit comments

Comments
 (0)