From ea7c90d471bbd6df746f349eb98f04c8ca3b5a09 Mon Sep 17 00:00:00 2001 From: yexo Date: Wed, 27 Jan 2010 13:06:58 +0000 Subject: (svn r18925) -Fix (r18924): a waypoint can have a buoy but no rail waypoint tile --- src/ai/api/ai_order.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ai/api/ai_order.cpp b/src/ai/api/ai_order.cpp index 0c0a3b0e5..3e7ff11af 100644 --- a/src/ai/api/ai_order.cpp +++ b/src/ai/api/ai_order.cpp @@ -213,7 +213,8 @@ static const Order *ResolveOrder(VehicleID vehicle_id, AIOrder::OrderPosition or if (wp->TileBelongsToRailStation(t)) return t; } } - return INVALID_TILE; + /* If the waypoint has no rail waypoint tiles, it must have a buoy */ + return wp->xy; } default: return INVALID_TILE; } -- cgit v1.2.3-54-g00ecf