From d10168f21183d1097b88ebe86ed5b5a9b1b3ef5e Mon Sep 17 00:00:00 2001 From: frosch Date: Mon, 8 Aug 2011 21:26:58 +0000 Subject: (svn r22731) -Fix: [NewGRF] The construction stage sprites were incorrectly selected in cases other than 1 or 4 sprites per set. --- src/newgrf_industrytiles.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/newgrf_industrytiles.cpp') diff --git a/src/newgrf_industrytiles.cpp b/src/newgrf_industrytiles.cpp index ae5dca45c..2aa636712 100644 --- a/src/newgrf_industrytiles.cpp +++ b/src/newgrf_industrytiles.cpp @@ -263,7 +263,7 @@ bool DrawNewIndustryTile(TileInfo *ti, Industry *i, IndustryGfx gfx, const Indus /* 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); + stage = tlgroup->GetConstructionStageOffset(stage); IndustryDrawTileLayout(ti, tlgroup, i->random_colour, stage, gfx); return true; } -- cgit v1.2.3-54-g00ecf