summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-12-09 18:27:40 +0000
committerrubidium <rubidium@openttd.org>2007-12-09 18:27:40 +0000
commitc3ea7e4dc455e0b427c5d00fb2fa9ef31f2c80ac (patch)
tree8d51772341e9000a1c8f0b82103c514a48abe512
parentf20e414e2e4ed659e436d7f194e628360fb451b0 (diff)
downloadopenttd-c3ea7e4dc455e0b427c5d00fb2fa9ef31f2c80ac.tar.xz
(svn r11608) -Fix: do not trigger industries, but only the industry's tiles.
-rw-r--r--src/newgrf_industries.cpp16
-rw-r--r--src/newgrf_industrytiles.cpp4
2 files changed, 0 insertions, 20 deletions
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;
-}
diff --git a/src/newgrf_industrytiles.cpp b/src/newgrf_industrytiles.cpp
index 36ab7bc2d..f77f536b4 100644
--- a/src/newgrf_industrytiles.cpp
+++ b/src/newgrf_industrytiles.cpp
@@ -413,8 +413,6 @@ void TriggerIndustryTile(TileIndex tile, IndustryTileTrigger trigger)
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 @@ void TriggerIndustry(Industry *ind, IndustryTileTrigger trigger)
DoTriggerIndustryTile(tile, trigger, ind);
}
END_TILE_LOOP(tile, ind->width, ind->height, ind->xy)
-
- DoTriggerIndustry(ind, trigger);
}