mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-03 04:43:12 +00:00
(svn r11158) -Codechange: reduce the amount of Random calls needed when we do not have NewGRF industries that actually need the random bits.
This commit is contained in:
parent
db0e01bd7b
commit
e61f197dba
@ -358,8 +358,11 @@ bool StartStopIndustryTileAnimation(const Industry *ind, IndustryAnimationTrigge
|
||||
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);
|
||||
if (StartStopIndustryTileAnimation(tile, iat, random)) {
|
||||
SB(random, 0, 16, Random());
|
||||
} else {
|
||||
ret = false;
|
||||
}
|
||||
}
|
||||
END_TILE_LOOP(tile, ind->width, ind->height, ind->xy)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user