summaryrefslogtreecommitdiff
path: root/src/station_cmd.cpp
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2010-01-18 14:32:47 +0000
committeryexo <yexo@openttd.org>2010-01-18 14:32:47 +0000
commita1f28ec88bf3987236fb1b9df9c9dbe8c68419b7 (patch)
tree1fe3a4233e91327653fa7aab2bb766aa187d0909 /src/station_cmd.cpp
parent565ad802b11f5ceab8e354a3c6aaf530998529d1 (diff)
downloadopenttd-a1f28ec88bf3987236fb1b9df9c9dbe8c68419b7.tar.xz
(svn r18860) -Codechange: introduce a wrapper to get an hangar tile from a station
Diffstat (limited to 'src/station_cmd.cpp')
-rw-r--r--src/station_cmd.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
index 1e24a70fc..e029573d6 100644
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -66,7 +66,7 @@ bool IsHangar(TileIndex t)
const AirportSpec *as = st->GetAirportSpec();
for (uint i = 0; i < as->nof_depots; i++) {
- if (st->airport_tile + ToTileIndexDiff(as->depot_table[i]) == t) return true;
+ if (st->GetHangarTile(i) == t) return true;
}
return false;
@@ -2090,7 +2090,7 @@ static CommandCost RemoveAirport(TileIndex tile, DoCommandFlag flags)
if (flags & DC_EXEC) {
for (uint i = 0; i < as->nof_depots; ++i) {
DeleteWindowById(
- WC_VEHICLE_DEPOT, tile + ToTileIndexDiff(as->depot_table[i])
+ WC_VEHICLE_DEPOT, st->GetHangarTile(i)
);
}