mirror of https://github.com/OpenTTD/OpenTTD
(svn r1773) -Fix: [ 1114950 ] Game crashed sometimes when there were no industries
in the maprelease/0.4.5
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…
Reference in New Issue