summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorterkhen <terkhen@openttd.org>2010-09-01 19:00:32 +0000
committerterkhen <terkhen@openttd.org>2010-09-01 19:00:32 +0000
commitefef4becbd33a50682692659949f4c1f8177cd27 (patch)
treefc8305cd6fd6b785adad9da9e18c6eab6cc5d96c
parentc6db7637818765193e9de8f3d11b8a2362e50f96 (diff)
downloadopenttd-efef4becbd33a50682692659949f4c1f8177cd27.tar.xz
(svn r20711) -Fix [FS#4094]: Do not use new game settings when creating many random towns at the scenario editor.
-rw-r--r--src/town_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp
index f99b1a081..d360f1044 100644
--- a/src/town_cmd.cpp
+++ b/src/town_cmd.cpp
@@ -1774,7 +1774,7 @@ static const byte _num_initial_towns[4] = {5, 11, 23, 46}; // very low, low, no
bool GenerateTowns(TownLayout layout)
{
uint current_number = 0;
- uint difficulty = _settings_game.difficulty.number_towns;
+ uint difficulty = (_game_mode != GM_EDITOR) ? _settings_game.difficulty.number_towns : 0;
uint total = (difficulty == (uint)CUSTOM_TOWN_NUMBER_DIFFICULTY) ? _settings_game.game_creation.custom_town_number : ScaleByMapSize(_num_initial_towns[difficulty] + (Random() & 7));
uint32 townnameparts;