1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-18 18:02:37 +01:00

Fix: [Script] Random deviation upper bound range should be inclusive

This commit is contained in:
SamuXarick
2020-03-31 13:58:27 +01:00
committed by Charles Pigott
parent d0613bad11
commit b6d409f8a7

View File

@@ -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));
}
}
}