mirror of https://github.com/OpenTTD/OpenTTD.git
Fix ccb4c37: Aircraft could route to hangars outside their range when stopping at them
This commit is contained in:
parent
b8b80cb42e
commit
ab52f7eecf
|
@ -134,7 +134,7 @@ static StationID FindNearestHangar(const Aircraft *v)
|
|||
const Station *next_dest = nullptr;
|
||||
if (max_range != 0) {
|
||||
if (v->current_order.IsType(OT_GOTO_STATION) ||
|
||||
(v->current_order.IsType(OT_GOTO_DEPOT) && v->current_order.GetDepotActionType() != ODATFB_NEAREST_DEPOT)) {
|
||||
(v->current_order.IsType(OT_GOTO_DEPOT) && (v->current_order.GetDepotActionType() & ODATFB_NEAREST_DEPOT) == 0)) {
|
||||
last_dest = Station::GetIfValid(v->last_station_visited);
|
||||
next_dest = Station::GetIfValid(v->current_order.GetDestination());
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue