summaryrefslogtreecommitdiff
path: root/src/newgrf_industrytiles.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/newgrf_industrytiles.cpp')
-rw-r--r--src/newgrf_industrytiles.cpp2
1 files changed, 1 insertions, 1 deletions
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;
}