Changeset - r7853:fe4eae46edfa
[Not reviewed]
master
0 1 0
rubidium - 17 years ago 2007-11-11 00:53:59
rubidium@openttd.org
(svn r11403) -Fix: NewIndustries GRF assume that tiles are already animated during construction.
1 file changed with 6 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/industry_cmd.cpp
Show inline comments
 
@@ -640,15 +640,13 @@ static void MakeIndustryTileBigger(TileI
 
	MarkTileDirtyByTile(tile);
 

	
 
	if (!IsIndustryCompleted(tile)) return;
 

	
 
	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;
 
	}
 

	
 
	switch (gfx) {
 
	case GFX_POWERPLANT_CHIMNEY:
 
		CreateIndustryEffectSmoke(tile);
 
@@ -1504,15 +1502,20 @@ static void DoCreateNewIndustry(Industry
 
			size = it->ti.y;
 
			if (size > i->height)i->height = size;
 

	
 
			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);
 

	
 
	i->width++;
 
	i->height++;
0 comments (0 inline, 0 general)