diff options
author | yexo <yexo@openttd.org> | 2010-01-18 14:32:47 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2010-01-18 14:32:47 +0000 |
commit | a1f28ec88bf3987236fb1b9df9c9dbe8c68419b7 (patch) | |
tree | 1fe3a4233e91327653fa7aab2bb766aa187d0909 /src/aircraft_cmd.cpp | |
parent | 565ad802b11f5ceab8e354a3c6aaf530998529d1 (diff) | |
download | openttd-a1f28ec88bf3987236fb1b9df9c9dbe8c68419b7.tar.xz |
(svn r18860) -Codechange: introduce a wrapper to get an hangar tile from a station
Diffstat (limited to 'src/aircraft_cmd.cpp')
-rw-r--r-- | src/aircraft_cmd.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp index 91e6fb88e..719fc971d 100644 --- a/src/aircraft_cmd.cpp +++ b/src/aircraft_cmd.cpp @@ -334,11 +334,9 @@ CommandCost CmdBuildAircraft(TileIndex tile, DoCommandFlag flags, uint32 p1, uin * of all depots, it is simple */ for (uint i = 0;; i++) { const Station *st = Station::GetByTile(tile); - const AirportSpec *as = st->GetAirportSpec(); const AirportFTAClass *apc = st->Airport(); - assert(i != as->nof_depots); - if (st->airport_tile + ToTileIndexDiff(as->depot_table[i]) == tile) { + if (st->GetHangarTile(i) == tile) { assert(apc->layout[i].heading == HANGAR); v->pos = apc->layout[i].position; break; |