Fix premature reservation end after reversing station found

ChooseTrainTrackLookAheadStateFlags/TrainReservationLookAheadFlags mixup
This commit is contained in:
Jonathan G Rennison
2021-11-12 00:03:09 +00:00
parent 2b1993ee4d
commit 2a2b988424

View File

@@ -3928,7 +3928,7 @@ static bool IsReservationLookAheadLongEnough(const Train *v, const ChooseTrainTr
if (v->current_order.IsAnyLoadingType() || v->current_order.IsType(OT_WAITING)) return true;
if (HasBit(lookahead_state.flags, CTTLASF_STOP_FOUND) || HasBit(lookahead_state.flags, TRLF_DEPOT_END)) return true;
if (HasBit(lookahead_state.flags, CTTLASF_STOP_FOUND) || HasBit(v->lookahead->flags, TRLF_DEPOT_END)) return true;
if (v->reverse_distance > 1) {
if (v->lookahead->reservation_end_position >= v->lookahead->current_position + v->reverse_distance - 1) return true;