Mercurial > hg > openttd
changeset 8048:27015788337e draft
(svn r11608) -Fix: do not trigger industries, but only the industry's tiles.
author | rubidium <rubidium@openttd.org> |
---|---|
date | Sun, 09 Dec 2007 18:27:40 +0000 |
parents | c6a11e3f379e |
children | 9007f88a1c87 |
files | src/newgrf_industries.cpp src/newgrf_industrytiles.cpp |
diffstat | 2 files changed, 0 insertions(+), 20 deletions(-) [+] |
line wrap: on
line diff
--- a/src/newgrf_industries.cpp +++ b/src/newgrf_industries.cpp @@ -535,19 +535,3 @@ InvalidateWindow(WC_INDUSTRY_VIEW, ind->index); } - -void DoTriggerIndustry(Industry *ind, IndustryTileTrigger trigger) -{ - ResolverObject object; - - NewIndustryResolver(&object, ind->xy, ind); - object.callback = CBID_RANDOM_TRIGGER; - object.trigger = trigger; - - const SpriteGroup *group = Resolve(GetIndustrySpec(ind->type)->grf_prop.spritegroup, &object); - if (group == NULL) return; - - byte new_random_bits = Random(); - ind->random &= ~object.reseed; - ind->random |= new_random_bits & object.reseed; -}
--- a/src/newgrf_industrytiles.cpp +++ b/src/newgrf_industrytiles.cpp @@ -413,8 +413,6 @@ DoTriggerIndustryTile(tile, trigger, GetIndustryByTile(tile)); } -extern void DoTriggerIndustry(Industry *ind, IndustryTileTrigger trigger); - void TriggerIndustry(Industry *ind, IndustryTileTrigger trigger) { BEGIN_TILE_LOOP(tile, ind->width, ind->height, ind->xy) @@ -422,6 +420,4 @@ DoTriggerIndustryTile(tile, trigger, ind); } END_TILE_LOOP(tile, ind->width, ind->height, ind->xy) - - DoTriggerIndustry(ind, trigger); }