summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ai/api/ai_order.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ai/api/ai_order.cpp b/src/ai/api/ai_order.cpp
index 92c9e5dc0..1062e501a 100644
--- a/src/ai/api/ai_order.cpp
+++ b/src/ai/api/ai_order.cpp
@@ -175,6 +175,9 @@ static const Order *ResolveOrder(VehicleID vehicle_id, AIOrder::OrderPosition or
switch (order->GetType()) {
case OT_GOTO_DEPOT: {
+ /* We don't know where the nearest depot is... (yet) */
+ if (order->GetDepotActionType() & ODATFB_NEAREST_DEPOT) return INVALID_TILE;
+
if (v->type != VEH_AIRCRAFT) return ::Depot::Get(order->GetDestination())->xy;
/* Aircraft's hangars are referenced by StationID, not DepotID */
const Station *st = ::Station::Get(order->GetDestination());