From c3ea7e4dc455e0b427c5d00fb2fa9ef31f2c80ac Mon Sep 17 00:00:00 2001 From: rubidium Date: Sun, 9 Dec 2007 18:27:40 +0000 Subject: (svn r11608) -Fix: do not trigger industries, but only the industry's tiles. --- src/newgrf_industries.cpp | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'src/newgrf_industries.cpp') diff --git a/src/newgrf_industries.cpp b/src/newgrf_industries.cpp index 603fba8f4..4cfec51f2 100644 --- a/src/newgrf_industries.cpp +++ b/src/newgrf_industries.cpp @@ -535,19 +535,3 @@ void IndustryProductionCallback(Industry *ind, int reason) 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; -} -- cgit v1.2.3-54-g00ecf