summaryrefslogtreecommitdiff
path: root/src/tree_cmd.cpp
diff options
context:
space:
mode:
authorskidd13 <skidd13@openttd.org>2007-11-25 15:35:25 +0000
committerskidd13 <skidd13@openttd.org>2007-11-25 15:35:25 +0000
commitbdc7fd2d765b84dc17415ecda0bef31471befa91 (patch)
tree169a43d7faea93613e95fcd0c3221376b8fbfc11 /src/tree_cmd.cpp
parent2bf2be987d414e2d80a20b7ace9ad9bde90fc7b8 (diff)
downloadopenttd-bdc7fd2d765b84dc17415ecda0bef31471befa91.tar.xz
(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
Diffstat (limited to 'src/tree_cmd.cpp')
-rw-r--r--src/tree_cmd.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tree_cmd.cpp b/src/tree_cmd.cpp
index 6614bb304..ac12a18b5 100644
--- a/src/tree_cmd.cpp
+++ b/src/tree_cmd.cpp
@@ -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);
}
}