Changeset - r7627:149960d8e202
[Not reviewed]
master
0 1 0
rubidium - 17 years ago 2007-09-24 20:56:33
rubidium@openttd.org
(svn r11158) -Codechange: reduce the amount of Random calls needed when we do not have NewGRF industries that actually need the random bits.
1 file changed with 5 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/newgrf_industrytiles.cpp
Show inline comments
 
@@ -358,8 +358,11 @@ bool StartStopIndustryTileAnimation(cons
 
	uint32 random = Random();
 
	BEGIN_TILE_LOOP(tile, ind->width, ind->height, ind->xy)
 
		if (IsTileType(tile, MP_INDUSTRY) && GetIndustryIndex(tile) == ind->index) {
 
			ret &= StartStopIndustryTileAnimation(tile, iat, random);
 
			SB(random, 0, 16, Random());
 
			if (StartStopIndustryTileAnimation(tile, iat, random)) {
 
				SB(random, 0, 16, Random());
 
			} else {
 
				ret = false;
 
			}
 
		}
 
	END_TILE_LOOP(tile, ind->width, ind->height, ind->xy)
 

	
0 comments (0 inline, 0 general)