(svn r1773) -Fix: [ 1114950 ] Game crashed sometimes when there were no industries

in the map
replace/41b28d7194a279bdc17475d4fbe2ea6ec885a466
truelight 20 years ago
parent 3f45338cc9
commit 74df79331d

@ -1860,7 +1860,7 @@ void IndustryMonthlyLoop(void)
/* 3% chance that we start a new industry */
if (CHANCE16(3, 100)) {
MaybeNewIndustry(Random());
} else if (!_patches.smooth_economy) {
} else if (!_patches.smooth_economy && _total_industries > 0) {
i = GetIndustry(RandomRange(_total_industries));
MaybeCloseIndustry(i);
}

Loading…
Cancel
Save