summaryrefslogtreecommitdiff
path: root/src/newgrf_industrytiles.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-12-16 11:35:05 +0000
committerrubidium <rubidium@openttd.org>2009-12-16 11:35:05 +0000
commitd46127a7237ddd815872941c36bbbd6f7f379852 (patch)
tree48f7bee7b00d55ba274d1ef309dce019ea2f763c /src/newgrf_industrytiles.cpp
parentf0728ca1d16b88a9327313e115554e3c6ff0a93f (diff)
downloadopenttd-d46127a7237ddd815872941c36bbbd6f7f379852.tar.xz
(svn r18514) -Codechange: make it a bit clearer that for tile layouts num_sprites (as in number of sprite sets) is not the same as num_sprites (as in number of building sprites)
Diffstat (limited to 'src/newgrf_industrytiles.cpp')
-rw-r--r--src/newgrf_industrytiles.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/newgrf_industrytiles.cpp b/src/newgrf_industrytiles.cpp
index 08ecac408..5da0fbd05 100644
--- a/src/newgrf_industrytiles.cpp
+++ b/src/newgrf_industrytiles.cpp
@@ -254,12 +254,12 @@ bool DrawNewIndustryTile(TileInfo *ti, Industry *i, IndustryGfx gfx, const Indus
group = SpriteGroup::Resolve(inds->grf_prop.spritegroup, &object);
const TileLayoutSpriteGroup *tlgroup = (const TileLayoutSpriteGroup *)group;
- if (group == NULL || group->type != SGT_TILELAYOUT || tlgroup->num_sprites == 0) {
+ if (group == NULL || group->type != SGT_TILELAYOUT || tlgroup->num_building_stages == 0) {
return false;
} else {
/* Limit the building stage to the number of stages supplied. */
byte stage = GetIndustryConstructionStage(ti->tile);
- stage = Clamp(stage - 4 + tlgroup->num_sprites, 0, tlgroup->num_sprites - 1);
+ stage = Clamp(stage - 4 + tlgroup->num_building_stages, 0, tlgroup->num_building_stages - 1);
IndustryDrawTileLayout(ti, tlgroup, i->random_colour, stage, gfx);
return true;
}