Mercurial > hg > openttd
changeset 7853:e800aee94c83 draft
(svn r11403) -Fix: NewIndustries GRF assume that tiles are already animated during construction.
author | rubidium <rubidium@openttd.org> |
---|---|
date | Sun, 11 Nov 2007 00:53:59 +0000 |
parents | 5d435ea53ec5 |
children | 511414333791 |
files | src/industry_cmd.cpp |
diffstat | 1 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/industry_cmd.cpp +++ b/src/industry_cmd.cpp @@ -643,9 +643,7 @@ 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 @@ 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);