summaryrefslogtreecommitdiff
path: root/src/newgrf_industrytiles.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-04-23 00:14:49 +0000
committerrubidium <rubidium@openttd.org>2008-04-23 00:14:49 +0000
commit2d860049a741eeeebac6ff3fb3b829cad967670c (patch)
treece7256cb62030c63a9834a408c4ce5f57d1076c9 /src/newgrf_industrytiles.cpp
parent501b89b8de86aef593035bcf8fcac5c262930651 (diff)
downloadopenttd-2d860049a741eeeebac6ff3fb3b829cad967670c.tar.xz
(svn r12844) -Fix: the industry tick trigger should only be triggered once every 256 ticks, not every tick... Also bail out of the triggers a little earlier if you know they are not going to happen anyway.
Diffstat (limited to 'src/newgrf_industrytiles.cpp')
-rw-r--r--src/newgrf_industrytiles.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/newgrf_industrytiles.cpp b/src/newgrf_industrytiles.cpp
index 79bbf72eb..093aeef0b 100644
--- a/src/newgrf_industrytiles.cpp
+++ b/src/newgrf_industrytiles.cpp
@@ -417,6 +417,8 @@ static void DoTriggerIndustryTile(TileIndex tile, IndustryTileTrigger trigger, I
IndustryGfx gfx = GetIndustryGfx(tile);
const IndustryTileSpec *itspec = GetIndustryTileSpec(gfx);
+ if (itspec->grf_prop.spritegroup == NULL) return;
+
NewIndustryTileResolver(&object, gfx, tile, ind);
object.callback = CBID_RANDOM_TRIGGER;