diff options
author | SamuXarick <43006711+SamuXarick@users.noreply.github.com> | 2018-09-20 21:31:38 +0100 |
---|---|---|
committer | frosch <github@elsenhans.name> | 2018-09-20 22:31:38 +0200 |
commit | 41fb7cb15e79e3abd3bfddec14048f026a2d62e5 (patch) | |
tree | 8a2d974d405d53d4a26d037316c9f38990e3a9b0 /src/script | |
parent | 59a1614ba0724bf5240b91d8cd2b90ff7eeb286c (diff) | |
download | openttd-41fb7cb15e79e3abd3bfddec14048f026a2d62e5.tar.xz |
Fix #6892: [Script] CONFIG_RANDOM did not use the full parameter range (#6902)
Diffstat (limited to 'src/script')
-rw-r--r-- | src/script/script_config.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/script/script_config.cpp b/src/script/script_config.cpp index a6e41476e..3171e67d4 100644 --- a/src/script/script_config.cpp +++ b/src/script/script_config.cpp @@ -36,7 +36,7 @@ void ScriptConfig::Change(const char *name, int version, bool force_exact_match, * for the Script that have the random flag to a random value. */ for (ScriptConfigItemList::const_iterator it = this->info->GetConfigList()->begin(); it != this->info->GetConfigList()->end(); it++) { if ((*it).flags & SCRIPTCONFIG_RANDOM) { - this->SetSetting((*it).name, InteractiveRandomRange((*it).max_value - (*it).min_value) + (*it).min_value); + this->SetSetting((*it).name, InteractiveRandomRange((*it).max_value + 1 - (*it).min_value) + (*it).min_value); } } this->AddRandomDeviation(); |