(svn r11876) -Fix: Start industry tile animation also for overridden industry tiles. (Will only apply to new games or newly build industries.)
authorfrosch
Wed, 16 Jan 2008 15:06:48 +0000
changeset 8311 033318a20764
parent 8310 917cddd4b2c8
child 8312 8b4944b3b5a3
(svn r11876) -Fix: Start industry tile animation also for overridden industry tiles. (Will only apply to new games or newly build industries.)
src/industry_cmd.cpp
--- a/src/industry_cmd.cpp	Wed Jan 16 13:59:08 2008 +0000
+++ b/src/industry_cmd.cpp	Wed Jan 16 15:06:48 2008 +0000
@@ -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);