changeset 16105:dc62a655c524 draft

(svn r20798) -Doc [FS#4117]: [NoAI] AITile::HasTransportType doesn't work for TRANSPORT_AIR
author yexo <yexo@openttd.org>
date Mon, 13 Sep 2010 13:36:36 +0000
parents 6d653b1a72fe
children 530933b50339
files src/ai/api/ai_tile.hpp
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/ai/api/ai_tile.hpp
+++ b/src/ai/api/ai_tile.hpp
@@ -298,10 +298,14 @@
 	 * @param tile The tile to check.
 	 * @param transport_type The TransportType to check against.
 	 * @pre AIMap::IsValidTile(tile).
+	 * @pre transport_type != TRANSPORT_AIR.
 	 * @note Returns false on tiles with roadworks and on road tiles with only
 	 *       a single piece of road as these tiles cannot be used to transport
 	 *       anything on. It furthermore returns true on some coast tile for
 	 *       TRANSPORT_WATER because ships can navigate over them.
+	 * @note Use AIAirport.IsAirportTile to check for airport tiles. Aircraft
+	 *       can fly over every tile on the map so using HasTransportType
+	 *       doesn't make sense for TRANSPORT_AIR.
 	 * @return True if and only if the tile has the given TransportType.
 	 */
 	static bool HasTransportType(TileIndex tile, TransportType transport_type);