changeset 8311:cc9727475f34 draft

(svn r11876) -Fix: Start industry tile animation also for overridden industry tiles. (Will only apply to new games or newly build industries.)
author frosch <frosch@openttd.org>
date Wed, 16 Jan 2008 15:06:48 +0000
parents a6c312c0f33b
children f6764781d2eb
files src/industry_cmd.cpp
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/industry_cmd.cpp
+++ b/src/industry_cmd.cpp
@@ -1524,11 +1524,11 @@
 				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);