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

in the map
pull/155/head
truelight 20 years ago
parent 8be7a90e65
commit 42c3de1459

@ -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