Changeset - r26298:a15b3c7ee02a
[Not reviewed]
master
0 1 0
Niels Martin Hansen - 2 years ago 2022-06-09 19:36:55
nielsm@indvikleren.dk
Fix #9918: Reset industy last production year on scenario start
1 file changed with 5 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/openttd.cpp
Show inline comments
 
@@ -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;
 
	}
 
}
 

	
 
/**
0 comments (0 inline, 0 general)