summaryrefslogtreecommitdiff
path: root/src/industry_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-11-11 00:53:59 +0000
committerrubidium <rubidium@openttd.org>2007-11-11 00:53:59 +0000
commitd32604d59e048ee72f7540e9146c6ad6e5bd4a31 (patch)
treedf18d9ce6e8a748fc849df8d9bc5e24d47194a96 /src/industry_cmd.cpp
parent63b36d9330dde1706dd7c2bea5b3f54db782f59c (diff)
downloadopenttd-d32604d59e048ee72f7540e9146c6ad6e5bd4a31.tar.xz
(svn r11403) -Fix: NewIndustries GRF assume that tiles are already animated during construction.
Diffstat (limited to 'src/industry_cmd.cpp')
-rw-r--r--src/industry_cmd.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp
index 0a7e6a502..1314fe2ec 100644
--- a/src/industry_cmd.cpp
+++ b/src/industry_cmd.cpp
@@ -643,9 +643,7 @@ static void MakeIndustryTileBigger(TileIndex tile)
IndustryGfx gfx = GetIndustryGfx(tile);
if (gfx >= NEW_INDUSTRYTILEOFFSET) {
- /* New industry */
- const IndustryTileSpec *its = GetIndustryTileSpec(gfx);
- if (its->animation_info != 0xFFFF) AddAnimatedTile(tile);
+ /* New industries are already animated on construction. */
return;
}
@@ -1507,9 +1505,14 @@ static void DoCreateNewIndustry(Industry *i, TileIndex tile, int type, const Ind
DoCommand(cur_tile, 0, 0, DC_EXEC, CMD_LANDSCAPE_CLEAR);
MakeIndustry(cur_tile, i->index, it->gfx);
+
if (_generating_world) {
SetIndustryConstructionCounter(cur_tile, 3);
SetIndustryConstructionStage(cur_tile, 2);
+ } else if (it->gfx >= NEW_INDUSTRYTILEOFFSET) {
+ /* New industry */
+ const IndustryTileSpec *its = GetIndustryTileSpec(it->gfx);
+ if (its->animation_info != 0xFFFF) AddAnimatedTile(cur_tile);
}
}
} while ((++it)->ti.x != -0x80);