--- a/industry_cmd.c Tue Aug 22 20:39:18 2006 +0000
+++ b/industry_cmd.c Tue Aug 22 20:41:26 2006 +0000
@@ -1878,8 +1878,8 @@
/* 3% chance that we start a new industry */
if (CHANCE16(3, 100)) {
MaybeNewIndustry(Random());
- } else if (!_patches.smooth_economy && _total_industries > 0) {
- i = GetIndustry(RandomRange(_total_industries));
+ } else if (!_patches.smooth_economy && GetIndustryArraySize() > 0) {
+ i = GetIndustry(RandomRange(GetIndustryArraySize()));
if (IsValidIndustry(i)) ChangeIndustryProduction(i);
}