1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-21 11:22:45 +01:00

Remove: [Script] CONFIG_RANDOM from AddSetting flags (#11942)

It had a very weird interaction, and was only ever used by a single
AI.
This commit is contained in:
Patric Stout
2024-01-31 23:24:36 +01:00
committed by GitHub
parent ccaa383e85
commit e28edf6945
8 changed files with 6 additions and 19 deletions

View File

@@ -162,12 +162,6 @@ SQInteger ScriptInfo::AddSetting(HSQUIRRELVM vm)
}
sq_pop(vm, 1);
/* Don't allow both random_deviation and SCRIPTCONFIG_RANDOM to
* be set for the same config item. */
if ((items & 0x200) != 0 && (config.flags & SCRIPTCONFIG_RANDOM) != 0) {
this->engine->ThrowError("Setting both random_deviation and SCRIPTCONFIG_RANDOM is not allowed");
return SQ_ERROR;
}
/* Reset the bit for random_deviation as it's optional. */
items &= ~0x200;