Changeset - r13013:3590520b247c
[Not reviewed]
master
0 1 0
rubidium - 15 years ago 2009-09-13 10:58:41
rubidium@openttd.org
(svn r17521) -Change: don't assume that there is always 'another' industry tile after two '0x18' industry tiles
1 file changed with 13 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/industry_cmd.cpp
Show inline comments
 
@@ -729,9 +729,19 @@ static void MakeIndustryTileBigger(TileI
 
		CreateChimneySmoke(tile);
 
		break;
 

	
 
	case GFX_OILRIG_1:
 
		if (GetIndustryGfx(tile + TileDiffXY(0, 1)) == GFX_OILRIG_1) BuildOilRig(tile);
 
		break;
 
	case GFX_OILRIG_1: {
 
		/* Do not require an industry tile to be after the first two GFX_OILRIG_1
 
		 * tiles (like the default oil rig). Do a proper check to ensure the
 
		 * tiles belong to the same industry and based on that build the oil rig's
 
		 * station. */
 
		TileIndex other = tile + TileDiffXY(0, 1);
 

	
 
		if (IsTileType(other, MP_INDUSTRY) &&
 
				GetIndustryGfx(other) == GFX_OILRIG_1 &&
 
				GetIndustryIndex(tile) == GetIndustryIndex(other)) {
 
			BuildOilRig(tile);
 
		}
 
	} break;
 

	
 
	case GFX_TOY_FACTORY:
 
	case GFX_BUBBLE_CATCHER:
0 comments (0 inline, 0 general)