mirror of https://github.com/OpenTTD/OpenTTD
(svn r11976) -Fix: It seems that industries using results 0D/0E on callback cb29/35 were a bit too eager to close down.
parent
bd0c853e27
commit
1fc0c0d2dc
|
@ -2143,9 +2143,13 @@ static void ChangeIndustryProduction(Industry *i, bool monthly)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Increase or Decreasing the production level if needed */
|
||||||
if (increment != 0) {
|
if (increment != 0) {
|
||||||
|
if !(increment < 0 && i->prod_level == 4) {
|
||||||
|
closeit = true;
|
||||||
|
} else {
|
||||||
i->prod_level = ClampU(i->prod_level + increment, 4, 0x80);
|
i->prod_level = ClampU(i->prod_level + increment, 4, 0x80);
|
||||||
if (i->prod_level == 4) closeit = true;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Close if needed and allowed */
|
/* Close if needed and allowed */
|
||||||
|
|
Loading…
Reference in New Issue