(svn r22710) -Fix [FS#4704]: Allow AIAirport::GetNoiseLevelIncrease() also for expired airports.
This commit is contained in:
@@ -131,7 +131,7 @@
|
|||||||
extern uint8 GetAirportNoiseLevelForTown(const AirportSpec *as, TileIndex town_tile, TileIndex tile);
|
extern uint8 GetAirportNoiseLevelForTown(const AirportSpec *as, TileIndex town_tile, TileIndex tile);
|
||||||
|
|
||||||
if (!::IsValidTile(tile)) return -1;
|
if (!::IsValidTile(tile)) return -1;
|
||||||
if (!IsValidAirportType(type)) return -1;
|
if (!IsAirportInformationAvailable(type)) return -1;
|
||||||
|
|
||||||
if (_settings_game.economy.station_noise_level) {
|
if (_settings_game.economy.station_noise_level) {
|
||||||
const AirportSpec *as = ::AirportSpec::Get(type);
|
const AirportSpec *as = ::AirportSpec::Get(type);
|
||||||
|
@@ -180,6 +180,7 @@ public:
|
|||||||
* built at this tile.
|
* built at this tile.
|
||||||
* @param tile The tile to check.
|
* @param tile The tile to check.
|
||||||
* @param type The AirportType to check.
|
* @param type The AirportType to check.
|
||||||
|
* @pre IsAirportInformationAvailable(type).
|
||||||
* @return The amount of noise added to the nearest town.
|
* @return The amount of noise added to the nearest town.
|
||||||
* @note The noise will be added to the town with TownID GetNearestTown(tile, type).
|
* @note The noise will be added to the town with TownID GetNearestTown(tile, type).
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user