(svn r22731) -Fix: [NewGRF] The construction stage sprites were incorrectly selected in cases other than 1 or 4 sprites per set.

This commit is contained in:
frosch
2011-08-08 21:26:58 +00:00
parent 68068b6eff
commit d10168f211
3 changed files with 21 additions and 2 deletions

View File

@@ -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;
}