mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-09 19:10:38 +00:00
(svn r22673) -Add #4690: Provide random bits in var 0x10 for callback 0x3B in all cases (Hirundo)
This commit is contained in:
parent
4336df45b8
commit
0f5eff9187
@ -1091,7 +1091,7 @@ static void ProduceIndustryGoods(Industry *i)
|
|||||||
if ((indbehav & INDUSTRYBEH_CUT_TREES) != 0) {
|
if ((indbehav & INDUSTRYBEH_CUT_TREES) != 0) {
|
||||||
bool cut = ((i->counter % INDUSTRY_CUT_TREE_TICKS) == 0);
|
bool cut = ((i->counter % INDUSTRY_CUT_TREE_TICKS) == 0);
|
||||||
if (HasBit(indsp->callback_mask, CBM_IND_SPECIAL_EFFECT)) {
|
if (HasBit(indsp->callback_mask, CBM_IND_SPECIAL_EFFECT)) {
|
||||||
cut = (GetIndustryCallback(CBID_INDUSTRY_SPECIAL_EFFECT, 0, 1, i, i->type, i->location.tile) != 0);
|
cut = (GetIndustryCallback(CBID_INDUSTRY_SPECIAL_EFFECT, Random(), 1, i, i->type, i->location.tile) != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cut) ChopLumberMillTrees(i);
|
if (cut) ChopLumberMillTrees(i);
|
||||||
|
Loading…
Reference in New Issue
Block a user