(svn r20559) -Fix [FS#4045]: make sure that all vehicles are build in the most northern depot/hangar tile

This commit is contained in:
yexo
2010-08-19 13:44:41 +00:00
parent 16be24e13a
commit 85740a0283
5 changed files with 21 additions and 6 deletions

View File

@@ -197,6 +197,19 @@ static inline DiagDirection GetShipDepotDirection(TileIndex t)
return XYNSToDiagDir(GetShipDepotAxis(t), GB(_m[t].m5, 0, 1));
}
/**
* 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.