diff options
author | frosch <frosch@openttd.org> | 2010-01-08 20:42:12 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2010-01-08 20:42:12 +0000 |
commit | 5b422d0c64f67101ed85ebf8934dc381817e1a7b (patch) | |
tree | 27ec3978a3fce34ba614c9722af2fc77e968ece4 /src/newgrf_industrytiles.cpp | |
parent | a16edfebd9b71aef938b4b32ac8276458aa33029 (diff) | |
download | openttd-5b422d0c64f67101ed85ebf8934dc381817e1a7b.tar.xz |
(svn r18761) -Fix [FS#3497]: Spritelayouts do not need an Action 1 if only using default sprites.
Diffstat (limited to 'src/newgrf_industrytiles.cpp')
-rw-r--r-- | src/newgrf_industrytiles.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/newgrf_industrytiles.cpp b/src/newgrf_industrytiles.cpp index 51084e415..5abd98f4d 100644 --- a/src/newgrf_industrytiles.cpp +++ b/src/newgrf_industrytiles.cpp @@ -253,11 +253,11 @@ bool DrawNewIndustryTile(TileInfo *ti, Industry *i, IndustryGfx gfx, const Indus NewIndustryTileResolver(&object, gfx, ti->tile, i); group = SpriteGroup::Resolve(inds->grf_prop.spritegroup, &object); - const TileLayoutSpriteGroup *tlgroup = (const TileLayoutSpriteGroup *)group; - if (group == NULL || group->type != SGT_TILELAYOUT || tlgroup->num_building_stages == 0) { + if (group == NULL || group->type != SGT_TILELAYOUT) { return false; } else { /* Limit the building stage to the number of stages supplied. */ + const TileLayoutSpriteGroup *tlgroup = (const TileLayoutSpriteGroup *)group; byte stage = GetIndustryConstructionStage(ti->tile); stage = Clamp(stage - 4 + tlgroup->num_building_stages, 0, tlgroup->num_building_stages - 1); IndustryDrawTileLayout(ti, tlgroup, i->random_colour, stage, gfx); |