summaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
authorSamuXarick <43006711+SamuXarick@users.noreply.github.com>2020-03-31 13:58:27 +0100
committerCharles Pigott <charlespigott@googlemail.com>2020-03-31 22:33:19 +0100
commit8f9654c5c658f2129838ba104a44f974f3388a2f (patch)
tree776a05d3bab660b7657c58f009f36c9b63dd260a /src/script
parentbd3a5876b0a730d4a5fc9e29a8446b7810c1697a (diff)
downloadopenttd-8f9654c5c658f2129838ba104a44f974f3388a2f.tar.xz
Fix: [Script] Random deviation upper bound range should be inclusive
Diffstat (limited to 'src/script')
-rw-r--r--src/script/script_config.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/script/script_config.cpp b/src/script/script_config.cpp
index e359afb1e..4ebd04916 100644
--- a/src/script/script_config.cpp
+++ b/src/script/script_config.cpp
@@ -131,7 +131,7 @@ void ScriptConfig::AddRandomDeviation()
{
for (ScriptConfigItemList::const_iterator it = this->GetConfigList()->begin(); it != this->GetConfigList()->end(); it++) {
if ((*it).random_deviation != 0) {
- this->SetSetting((*it).name, InteractiveRandomRange((*it).random_deviation * 2) - (*it).random_deviation + this->GetSetting((*it).name));
+ this->SetSetting((*it).name, InteractiveRandomRange((*it).random_deviation * 2 + 1) - (*it).random_deviation + this->GetSetting((*it).name));
}
}
}