mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-01 11:59:26 +00:00
(svn r21265) -Fix [FS#4245]: Don't setup target industry type counts if there are no industry types available.
This commit is contained in:
parent
130e2e9f4f
commit
d6afbd025c
@ -2137,6 +2137,8 @@ void IndustryBuildData::SetupTargetCount()
|
|||||||
total_prob += ibd->probability;
|
total_prob += ibd->probability;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (total_prob == 0) return; // No buildable industries.
|
||||||
|
|
||||||
/* Subtract forced industries from the number of industries available for construction. */
|
/* Subtract forced industries from the number of industries available for construction. */
|
||||||
total_amount = (total_amount <= force_build) ? 0 : total_amount - force_build;
|
total_amount = (total_amount <= force_build) ? 0 : total_amount - force_build;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user