summaryrefslogtreecommitdiff
path: root/aircraft_gui.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-11-15 11:08:10 +0000
committertron <tron@openttd.org>2005-11-15 11:08:10 +0000
commitea5672ec8f0452f46c94985e68c66dc304f6e27c (patch)
treeea73210253f81ac6b3ec12e26c8b21497753d693 /aircraft_gui.c
parente901aefb74216d8fd941034233195ed312d8838f (diff)
downloadopenttd-ea5672ec8f0452f46c94985e68c66dc304f6e27c.tar.xz
(svn r3189) There's a dedicated function to check if it's a hangar tile, so use it
Diffstat (limited to 'aircraft_gui.c')
-rw-r--r--aircraft_gui.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/aircraft_gui.c b/aircraft_gui.c
index 970ea1673..2594dec9a 100644
--- a/aircraft_gui.c
+++ b/aircraft_gui.c
@@ -502,13 +502,8 @@ static void AircraftViewWndProc(Window *w, WindowEvent *e)
uint32 disabled = 1 << 8;
StringID str;
- {
- TileIndex tile = v->tile;
-
- if (IsTileType(tile, MP_STATION) &&
- (_m[tile].m5 == 32 || _m[tile].m5 == 65) &&
- v->vehstatus&VS_STOPPED)
- disabled = 0;
+ if (v->vehstatus & VS_STOPPED && IsAircraftHangarTile(v->tile)) {
+ disabled = 0;
}
if (v->owner != _local_player) disabled |= 1 << 8 | 1 << 7;