File diff r12518:dd86e5f83232 → r12519:e52fcaadf579
src/newgrf_industrytiles.cpp
Show inline comments
 
@@ -386,21 +386,21 @@ bool StartStopIndustryTileAnimation(Tile
 
}
 

	
 
bool StartStopIndustryTileAnimation(const Industry *ind, IndustryAnimationTrigger iat)
 
{
 
	bool ret = true;
 
	uint32 random = Random();
 
	BEGIN_TILE_LOOP(tile, ind->width, ind->height, ind->xy)
 
	TILE_LOOP(tile, ind->width, ind->height, ind->xy) {
 
		if (IsTileType(tile, MP_INDUSTRY) && GetIndustryIndex(tile) == ind->index) {
 
			if (StartStopIndustryTileAnimation(tile, iat, random)) {
 
				SB(random, 0, 16, Random());
 
			} else {
 
				ret = false;
 
			}
 
		}
 
	END_TILE_LOOP(tile, ind->width, ind->height, ind->xy)
 
	}
 

	
 
	return ret;
 
}
 

	
 
static void DoTriggerIndustryTile(TileIndex tile, IndustryTileTrigger trigger, Industry *ind)
 
{
 
@@ -430,12 +430,12 @@ void TriggerIndustryTile(TileIndex tile,
 
{
 
	DoTriggerIndustryTile(tile, trigger, GetIndustryByTile(tile));
 
}
 

	
 
void TriggerIndustry(Industry *ind, IndustryTileTrigger trigger)
 
{
 
	BEGIN_TILE_LOOP(tile, ind->width, ind->height, ind->xy)
 
	TILE_LOOP(tile, ind->width, ind->height, ind->xy) {
 
		if (IsTileType(tile, MP_INDUSTRY) && GetIndustryIndex(tile) == ind->index) {
 
			DoTriggerIndustryTile(tile, trigger, ind);
 
		}
 
	END_TILE_LOOP(tile, ind->width, ind->height, ind->xy)
 
	}
 
}