diff options
author | frosch <frosch@openttd.org> | 2011-08-01 20:15:18 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2011-08-01 20:15:18 +0000 |
commit | bf3a9dfdaf5c1c88c9ce7141f209f244f59e7d33 (patch) | |
tree | c67bc940b9fa2756ff7d6dbfaa8f696420cd0f27 /src | |
parent | 89c7193b8fe72d043bdeb9e44963adfed3b72134 (diff) | |
download | openttd-bf3a9dfdaf5c1c88c9ce7141f209f244f59e7d33.tar.xz |
(svn r22710) -Fix [FS#4704]: Allow AIAirport::GetNoiseLevelIncrease() also for expired airports.
Diffstat (limited to 'src')
-rw-r--r-- | src/ai/api/ai_airport.cpp | 2 | ||||
-rw-r--r-- | src/ai/api/ai_airport.hpp | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/ai/api/ai_airport.cpp b/src/ai/api/ai_airport.cpp index c52e5abd2..ac0dd6422 100644 --- a/src/ai/api/ai_airport.cpp +++ b/src/ai/api/ai_airport.cpp @@ -131,7 +131,7 @@ extern uint8 GetAirportNoiseLevelForTown(const AirportSpec *as, TileIndex town_tile, TileIndex tile); if (!::IsValidTile(tile)) return -1; - if (!IsValidAirportType(type)) return -1; + if (!IsAirportInformationAvailable(type)) return -1; if (_settings_game.economy.station_noise_level) { const AirportSpec *as = ::AirportSpec::Get(type); diff --git a/src/ai/api/ai_airport.hpp b/src/ai/api/ai_airport.hpp index a058209c6..a889b3289 100644 --- a/src/ai/api/ai_airport.hpp +++ b/src/ai/api/ai_airport.hpp @@ -180,6 +180,7 @@ public: * built at this tile. * @param tile The tile to check. * @param type The AirportType to check. + * @pre IsAirportInformationAvailable(type). * @return The amount of noise added to the nearest town. * @note The noise will be added to the town with TownID GetNearestTown(tile, type). */ |