(svn r3189) There's a dedicated function to check if it's a hangar tile, so use it
authortron
Tue, 15 Nov 2005 11:08:10 +0000
changeset 2647 c3a5b4c7a5aa
parent 2646 a91fd482fce5
child 2648 72973ab76048
(svn r3189) There's a dedicated function to check if it's a hangar tile, so use it
aircraft_gui.c
--- a/aircraft_gui.c	Tue Nov 15 10:50:43 2005 +0000
+++ b/aircraft_gui.c	Tue Nov 15 11:08:10 2005 +0000
@@ -502,13 +502,8 @@
 		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;