mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-17 21:25:40 +00:00
(svn r1773) -Fix: [ 1114950 ] Game crashed sometimes when there were no industries
in the map
This commit is contained in:
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
Block a user