mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-19 18:32:35 +01:00
(svn r15903) [0.7] -Backport from trunk:
- Fix: YAPF did not apply the platform length (too long/too short) penalties (r15900) - Fix: Fixing the slopes was done a bit more often than intended making map generation with the original generator horribly slow (r15895) - Fix: YAPF used different penalties for aqueducts than for other water tiles (r15891) - Fix: Round the production rate up, so e.g. oilrigs always produce some passengers on lowest production level [FS#2772] (r15888) - Fix: Libtimidity cannot handle frees of NULL (in contrast of most other frees) [FS#2770] (r15886) - Fix: Make sure house class/ID counters do not overflow (r15831)
This commit is contained in:
@@ -2211,8 +2211,9 @@ static void ChangeIndustryProduction(Industry *i, bool monthly)
|
||||
/* Recalculate production_rate
|
||||
* For non-smooth economy these should always be synchronized with prod_level */
|
||||
if (recalculate_multipliers) {
|
||||
i->production_rate[0] = min(indspec->production_rate[0] * i->prod_level / PRODLEVEL_DEFAULT, 0xFF);
|
||||
i->production_rate[1] = min(indspec->production_rate[1] * i->prod_level / PRODLEVEL_DEFAULT, 0xFF);
|
||||
/* Rates are rounded up, so e.g. oilrig always produces some passengers */
|
||||
i->production_rate[0] = min((indspec->production_rate[0] * i->prod_level + PRODLEVEL_DEFAULT - 1) / PRODLEVEL_DEFAULT, 0xFF);
|
||||
i->production_rate[1] = min((indspec->production_rate[1] * i->prod_level + PRODLEVEL_DEFAULT - 1) / PRODLEVEL_DEFAULT, 0xFF);
|
||||
}
|
||||
|
||||
/* Close if needed and allowed */
|
||||
|
||||
Reference in New Issue
Block a user