From 7c882b43ebd56ee6cdb16b061078c1e59eeaac31 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Sun, 4 Dec 2022 21:22:43 +0000 Subject: [PATCH] Fix cloning/copying aircraft with go to nearest hangar orders --- src/order_cmd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp index bbead403ec..cefb7411a7 100644 --- a/src/order_cmd.cpp +++ b/src/order_cmd.cpp @@ -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); } /**