Try to extend reservation when passing sighting distance of non-end signal
This commit is contained in:
@@ -975,6 +975,7 @@ static void AdvanceLookAheadPosition(Train *v)
|
||||
const int32 old_position = v->lookahead->current_position;
|
||||
v->lookahead->current_position = 0;
|
||||
v->lookahead->reservation_end_position -= old_position;
|
||||
v->lookahead->next_extend_position -= old_position;
|
||||
for (TrainReservationLookAheadItem &item : v->lookahead->items) {
|
||||
item.start -= old_position;
|
||||
item.end -= old_position;
|
||||
@@ -998,6 +999,11 @@ static void AdvanceLookAheadPosition(Train *v)
|
||||
}
|
||||
v->lookahead->items.pop_front();
|
||||
}
|
||||
|
||||
if (v->lookahead->current_position == v->lookahead->next_extend_position) {
|
||||
TryLongReserveChooseTrainTrackFromReservationEnd(v, true);
|
||||
v->lookahead->SetNextExtendPositionIfUnset();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user