Fix train braking behaviour when lookahead is aspect limited

When lookahead end is within the reservation end
This commit is contained in:
Jonathan G Rennison
2022-07-30 20:37:03 +01:00
parent 71b6d7a502
commit cbabbb6db6
2 changed files with 4 additions and 2 deletions

View File

@@ -959,7 +959,8 @@ static void ApplyLookAheadItem(const Train *v, const TrainReservationLookAheadIt
break;
case TRLIT_SIGNAL:
if (_settings_game.vehicle.realistic_braking_aspect_limited == TRBALM_ON && v->lookahead->lookahead_end_position == item.start) {
if (_settings_game.vehicle.realistic_braking_aspect_limited == TRBALM_ON &&
(v->lookahead->lookahead_end_position == item.start || v->lookahead->lookahead_end_position == item.start + 1)) {
limit_advisory_speed(item.start, 0, item.z_pos);
}
break;