diff options
author | yexo <yexo@openttd.org> | 2009-02-14 21:16:21 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2009-02-14 21:16:21 +0000 |
commit | 16954ba37806a4510e626d5ceb29f8114c275a3d (patch) | |
tree | 0080f4623a8ee03c92d581adb1d7f6de837db053 /src/ai/api/ai_airport.cpp | |
parent | bce1bcb0f27affa6678c3f657c06955afbf4b47b (diff) | |
download | openttd-16954ba37806a4510e626d5ceb29f8114c275a3d.tar.xz |
(svn r15489) -Change [API CHANGE]: Remove AIAirport::AirportAvailable. AIAirport::IsValidAirportType now only returns true for available AirportTypes.
Diffstat (limited to 'src/ai/api/ai_airport.cpp')
-rw-r--r-- | src/ai/api/ai_airport.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/ai/api/ai_airport.cpp b/src/ai/api/ai_airport.cpp index b2b969b82..ed58701c3 100644 --- a/src/ai/api/ai_airport.cpp +++ b/src/ai/api/ai_airport.cpp @@ -11,7 +11,7 @@ /* static */ bool AIAirport::IsValidAirportType(AirportType type) { - return type >= AT_SMALL && type <= AT_HELISTATION; + return type >= AT_SMALL && type <= AT_HELISTATION && HasBit(::GetValidAirports(), type); } /* static */ bool AIAirport::IsHangarTile(TileIndex tile) @@ -28,13 +28,6 @@ return ::IsTileType(tile, MP_STATION) && ::IsAirport(tile); } -/* static */ bool AIAirport::AirportAvailable(AirportType type) -{ - if (!IsValidAirportType(type)) return false; - - return HasBit(::GetValidAirports(), type); -} - /* static */ int32 AIAirport::GetAirportWidth(AirportType type) { if (!IsValidAirportType(type)) return -1; |