diff options
author | skidd13 <skidd13@openttd.org> | 2007-11-25 15:35:25 +0000 |
---|---|---|
committer | skidd13 <skidd13@openttd.org> | 2007-11-25 15:35:25 +0000 |
commit | bdc7fd2d765b84dc17415ecda0bef31471befa91 (patch) | |
tree | 169a43d7faea93613e95fcd0c3221376b8fbfc11 /src/vehicle.cpp | |
parent | 2bf2be987d414e2d80a20b7ace9ad9bde90fc7b8 (diff) | |
download | openttd-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/vehicle.cpp')
-rw-r--r-- | src/vehicle.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp index 85832a711..802eca17f 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -1264,7 +1264,7 @@ static void BubbleTick(Vehicle *v) } if (b->y == 4 && b->x == 1) { - if (v->z_pos > 180 || CHANCE16I(1, 96, InteractiveRandom())) { + if (v->z_pos > 180 || Chance16I(1, 96, InteractiveRandom())) { v->spritenum = 5; SndPlayVehicleFx(SND_2F_POP, v); } @@ -1443,7 +1443,7 @@ void CheckVehicleBreakdown(Vehicle *v) /* increase chance of failure */ chance = v->breakdown_chance + 1; - if (CHANCE16I(1,25,r)) chance += 25; + if (Chance16I(1,25,r)) chance += 25; v->breakdown_chance = min(255, chance); /* calculate reliability value to use in comparison */ |