summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2008-01-16 15:06:48 +0000
committerfrosch <frosch@openttd.org>2008-01-16 15:06:48 +0000
commit9a9a1dcb6c8e049dcf4a800e53879fecd801aa63 (patch)
treeb03517cb9aa6a1f95650005721864fce85355886 /src
parenta09b0e21e45a60ab5efa37100d969fd51185ab58 (diff)
downloadopenttd-9a9a1dcb6c8e049dcf4a800e53879fecd801aa63.tar.xz
(svn r11876) -Fix: Start industry tile animation also for overridden industry tiles. (Will only apply to new games or newly build industries.)
Diffstat (limited to 'src')
-rw-r--r--src/industry_cmd.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp
index 005296143..dd55b24ca 100644
--- a/src/industry_cmd.cpp
+++ b/src/industry_cmd.cpp
@@ -1524,11 +1524,11 @@ static void DoCreateNewIndustry(Industry *i, TileIndex tile, int type, const Ind
SetIndustryConstructionCounter(cur_tile, 3);
SetIndustryConstructionStage(cur_tile, 2);
}
- if (it->gfx >= NEW_INDUSTRYTILEOFFSET) {
- /* New industry */
- const IndustryTileSpec *its = GetIndustryTileSpec(it->gfx);
- if (its->animation_info != 0xFFFF) AddAnimatedTile(cur_tile);
- }
+
+ /* it->gfx is stored in the map. But the translated ID cur_gfx is the interesting one */
+ IndustryGfx cur_gfx = GetTranslatedIndustryTileID(it->gfx);
+ const IndustryTileSpec *its = GetIndustryTileSpec(cur_gfx);
+ if (its->animation_info != 0xFFFF) AddAnimatedTile(cur_tile);
}
} while ((++it)->ti.x != -0x80);