diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index a4e871c922..3cbd491663 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -2580,13 +2580,14 @@ uint8_t GetAirportNoiseLevelForDistance(const AirportSpec *as, uint distance) * So no need to go any further*/ if (as->noise_level < 2) return as->noise_level; - if (_settings_game.difficulty.town_council_tolerance == TOWN_COUNCIL_PERMISSIVE) return 1; + auto tolerance = _settings_game.difficulty.town_council_tolerance; + if (tolerance == TOWN_COUNCIL_PERMISSIVE) tolerance = TOWN_COUNCIL_LENIENT; /* The steps for measuring noise reduction are based on the "magical" (and arbitrary) 8 base distance * adding the town_council_tolerance 4 times, as a way to graduate, depending of the tolerance. * Basically, it says that the less tolerant a town is, the bigger the distance before * an actual decrease can be granted */ - uint8_t town_tolerance_distance = 8 + (_settings_game.difficulty.town_council_tolerance * 4); + uint8_t town_tolerance_distance = 8 + (tolerance * 4); /* now, we want to have the distance segmented using the distance judged bareable by town * This will give us the coefficient of reduction the distance provides. */