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 | e36dba227b3ef5414757282661a8108d3a2bc9f6 (patch) | |
tree | 169a43d7faea93613e95fcd0c3221376b8fbfc11 /src/disaster_cmd.cpp | |
parent | e3092f679177eda2ecfe5dcf05cd565cbe62c3fa (diff) | |
download | openttd-e36dba227b3ef5414757282661a8108d3a2bc9f6.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/disaster_cmd.cpp')
-rw-r--r-- | src/disaster_cmd.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/disaster_cmd.cpp b/src/disaster_cmd.cpp index 53db580e6..aa04e900a 100644 --- a/src/disaster_cmd.cpp +++ b/src/disaster_cmd.cpp @@ -715,7 +715,7 @@ static void DisasterTick_Submarine(Vehicle *v) if (IsValidTile(tile)) { TrackdirBits r = (TrackdirBits)GetTileTrackStatus(tile, TRANSPORT_WATER, 0); - if (TrackdirBitsToTrackBits(r) == TRACK_BIT_ALL && !CHANCE16(1, 90)) { + if (TrackdirBitsToTrackBits(r) == TRACK_BIT_ALL && !Chance16(1, 90)) { GetNewVehiclePosResult gp = GetNewVehiclePos(v); SetDisasterVehiclePos(v, gp.x, gp.y, v->z_pos); return; @@ -825,7 +825,7 @@ static void Disaster_Airplane_Init() FOR_ALL_INDUSTRIES(i) { if ((GetIndustrySpec(i->type)->behaviour & INDUSTRYBEH_AIRPLANE_ATTACKS) && - (found == NULL || CHANCE16(1, 2))) { + (found == NULL || Chance16(1, 2))) { found = i; } } @@ -861,7 +861,7 @@ static void Disaster_Helicopter_Init() FOR_ALL_INDUSTRIES(i) { if ((GetIndustrySpec(i->type)->behaviour & INDUSTRYBEH_CHOPPER_ATTACKS) && - (found == NULL || CHANCE16(1, 2))) { + (found == NULL || Chance16(1, 2))) { found = i; } } |