summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/industry_cmd.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp
index bd1d28ef6..443702993 100644
--- a/src/industry_cmd.cpp
+++ b/src/industry_cmd.cpp
@@ -2079,13 +2079,14 @@ static Industry *CreateNewIndustry(TileIndex tile, IndustryType type, IndustryAv
static uint32 GetScaledIndustryGenerationProbability(IndustryType it, bool *force_at_least_one)
{
const IndustrySpec *ind_spc = GetIndustrySpec(it);
- uint32 chance = ind_spc->appear_creation[_settings_game.game_creation.landscape] * 16; // * 16 to increase precision
+ uint32 chance = ind_spc->appear_creation[_settings_game.game_creation.landscape];
if (!ind_spc->enabled || ind_spc->layouts.empty() ||
(_game_mode != GM_EDITOR && _settings_game.difficulty.industry_density == ID_FUND_ONLY) ||
(chance = GetIndustryProbabilityCallback(it, IACT_MAPGENERATION, chance)) == 0) {
*force_at_least_one = false;
return 0;
} else {
+ chance *= 16; // to increase precision
/* We want industries appearing at coast to appear less often on bigger maps, as length of coast increases slower than map area.
* For simplicity we scale in both cases, though scaling the probabilities of all industries has no effect. */
chance = (ind_spc->check_proc == CHECK_REFINERY || ind_spc->check_proc == CHECK_OIL_RIG) ? ScaleByMapSize1D(chance) : ScaleByMapSize(chance);