summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/newgrf_industries.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/newgrf_industries.cpp b/src/newgrf_industries.cpp
index 257e27df1..6716d2c03 100644
--- a/src/newgrf_industries.cpp
+++ b/src/newgrf_industries.cpp
@@ -54,7 +54,7 @@ IndustryType MapNewGRFIndustryType(IndustryType grf_type, uint32 grf_id)
*/
uint32 GetIndustryIDAtOffset(TileIndex tile, const Industry *i, uint32 cur_grfid)
{
- if (!IsTileType(tile, MP_INDUSTRY) || GetIndustryIndex(tile) != i->index) {
+ if (!i->TileBelongsToIndustry(tile)) {
/* No industry and/or the tile does not have the same industry as the one we match it with */
return 0xFFFF;
}