Fix #9918: Reset industy last production year on scenario start

This commit is contained in:
Niels Martin Hansen 2022-06-09 21:36:55 +02:00
parent 2cdb0cb084
commit 470c902bdc
1 changed files with 5 additions and 0 deletions

View File

@ -844,6 +844,11 @@ static void OnStartScenario()
{
/* Reset engine pool to simplify changing engine NewGRFs in scenario editor. */
EngineOverrideManager::ResetToCurrentNewGRFConfig();
/* Make sure all industries were built "this year", to avoid too early closures. (#9918) */
for (Industry *i : Industry::Iterate()) {
i->last_prod_year = _cur_year;
}
}
/**