Disable town noise limits in indifferent town tolerance mode

Instead of setting noise limit to 0
This commit is contained in:
Jonathan G Rennison
2021-06-16 20:31:38 +01:00
parent af89056824
commit 1e64ee4f6b
3 changed files with 7 additions and 3 deletions

View File

@@ -150,7 +150,9 @@ struct Town : TownPool::PoolItem<&_town_pool> {
*/
inline uint16 MaxTownNoise() const
{
if (this->cache.population == 0 || _settings_game.difficulty.town_council_tolerance == TOWN_COUNCIL_INDIFFERENT) return 0; // no population? no noise
if (_settings_game.difficulty.town_council_tolerance == TOWN_COUNCIL_INDIFFERENT) return UINT16_MAX;
if (this->cache.population == 0) return 0; // no population? no noise
/* 3 is added (the noise of the lowest airport), so the user can at least build a small airfield. */
return (this->cache.population / _settings_game.economy.town_noise_population[_settings_game.difficulty.town_council_tolerance]) + 3;