diff options
author | yexo <yexo@openttd.org> | 2010-08-19 13:44:41 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2010-08-19 13:44:41 +0000 |
commit | 85740a02832c9c474833f929b4464eba06be66d3 (patch) | |
tree | 9e10d3039ec55bce24ceebffd0c4c949be1f45ee /src/water_map.h | |
parent | 16be24e13acf17a3292b490196d301b5b1aa1056 (diff) | |
download | openttd-85740a02832c9c474833f929b4464eba06be66d3.tar.xz |
(svn r20559) -Fix [FS#4045]: make sure that all vehicles are build in the most northern depot/hangar tile
Diffstat (limited to 'src/water_map.h')
-rw-r--r-- | src/water_map.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/water_map.h b/src/water_map.h index 55e2730a5..83c3a055f 100644 --- a/src/water_map.h +++ b/src/water_map.h @@ -198,6 +198,19 @@ static inline DiagDirection GetShipDepotDirection(TileIndex t) } /** + * Get the most northern tile of a ship depot. + * @param tile One of the tiles of the ship depot. + * @return The northern tile of the depot. + */ +static TileIndex GetShipDepotNorthTile(TileIndex t) +{ + assert(IsShipDepot(t)); + TileIndex tile2 = GetOtherShipDepotTile(t); + + return t < tile2 ? t : tile2; +} + +/** * Is it a water lock tile? * @param t Water tile to query. * @return \c true if it is a water lock tile. |