forked from mirror/OpenTTD
(svn r11523) -Codechange: Move the CHANCE macros to core/random_func.cpp cause they depend on Random()
-Codechange: Convert the CHANCE macros to functions and rename them fitting to the naming style
This commit is contained in:
@@ -543,7 +543,7 @@ static void TileLoopTreesDesert(TileIndex tile)
|
||||
};
|
||||
uint32 r = Random();
|
||||
|
||||
if (CHANCE16I(1, 200, r)) SndPlayTileFx(forest_sounds[GB(r, 16, 2)], tile);
|
||||
if (Chance16I(1, 200, r)) SndPlayTileFx(forest_sounds[GB(r, 16, 2)], tile);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -567,7 +567,7 @@ static void TileLoopTreesAlps(TileIndex tile)
|
||||
} else {
|
||||
if (GetTreeDensity(tile) == 3) {
|
||||
uint32 r = Random();
|
||||
if (CHANCE16I(1, 200, r)) {
|
||||
if (Chance16I(1, 200, r)) {
|
||||
SndPlayTileFx((r & 0x80000000) ? SND_39_HEAVY_WIND : SND_34_WIND, tile);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user