summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2010-01-27 13:06:58 +0000
committeryexo <yexo@openttd.org>2010-01-27 13:06:58 +0000
commitea7c90d471bbd6df746f349eb98f04c8ca3b5a09 (patch)
treeea0f6b4d47c3b931ff57737547a69e0c43feace8
parent849e676410472daf17a1996a57bccacab91594dc (diff)
downloadopenttd-ea7c90d471bbd6df746f349eb98f04c8ca3b5a09.tar.xz
(svn r18925) -Fix (r18924): a waypoint can have a buoy but no rail waypoint tile
-rw-r--r--src/ai/api/ai_order.cpp3
1 files changed, 2 insertions, 1 deletions
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;
}