Fix cloning/copying aircraft with go to nearest hangar orders

This commit is contained in:
Jonathan G Rennison
2022-12-04 21:22:43 +00:00
parent df86c5cadb
commit 7c882b43eb

View File

@@ -871,7 +871,7 @@ void OrderList::DebugCheckSanity() const
static inline bool OrderGoesToStation(const Vehicle *v, const Order *o)
{
return o->IsType(OT_GOTO_STATION) ||
(v->type == VEH_AIRCRAFT && o->IsType(OT_GOTO_DEPOT) && o->GetDestination() != INVALID_STATION);
(v->type == VEH_AIRCRAFT && o->IsType(OT_GOTO_DEPOT) && !(o->GetDepotActionType() & ODATFB_NEAREST_DEPOT) && o->GetDestination() != INVALID_STATION);
}
/**