Skip to content

Commit

Permalink
Fix: AI Driver air brake behaviour incorrect on long stops
Browse files Browse the repository at this point in the history
Air brake should be held at SRV, not released when brakes are applied (Otherwise, as the brake pressure drops the AI bounces the brakes on and off to maintain BC pressure)
  • Loading branch information
leezer3 committed Sep 18, 2019
1 parent 8df1480 commit 087149b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/OpenBVE/Game/AI/AI.SimpleHuman.cs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ private void PerformDefault()
Train.ApplyNotch(-1, true, 0, true);
if (Train.Handles.Brake is TrainManager.AirBrakeHandle)
{
if (Train.Cars[Train.DriverCar].CarBrake.brakeCylinder.CurrentPressure < 0.3 * Train.Cars[Train.DriverCar].CarBrake.brakeCylinder.ServiceMaximumPressure)
if (Train.StationDepartureTime - CurrentRoute.SecondsSinceMidnight > 10 || Train.Cars[Train.DriverCar].CarBrake.brakeCylinder.CurrentPressure < 0.3 * Train.Cars[Train.DriverCar].CarBrake.brakeCylinder.ServiceMaximumPressure)
{
Train.ApplyAirBrakeHandle(TrainManager.AirBrakeHandleState.Service);
}
Expand Down

0 comments on commit 087149b

Please sign in to comment.