summaryrefslogtreecommitdiff
path: root/src/ai/default
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
commite36dba227b3ef5414757282661a8108d3a2bc9f6 (patch)
tree169a43d7faea93613e95fcd0c3221376b8fbfc11 /src/ai/default
parente3092f679177eda2ecfe5dcf05cd565cbe62c3fa (diff)
downloadopenttd-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/ai/default')
-rw-r--r--src/ai/default/default.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ai/default/default.cpp b/src/ai/default/default.cpp
index 5655b375f..e0aa1ae00 100644
--- a/src/ai/default/default.cpp
+++ b/src/ai/default/default.cpp
@@ -643,7 +643,7 @@ static bool AiCheckIfRouteIsGood(Player *p, FoundRoute *fr, byte bitmask)
if (p->ai.route_type_mask != 0 &&
!(p->ai.route_type_mask & bitmask) &&
- !CHANCE16(1, 5)) {
+ !Chance16(1, 5)) {
return false;
}
@@ -1452,7 +1452,7 @@ static void AiWantPassengerAircraftRoute(Player *p)
* Also, non-full load is more resistant against starving (by building better stations
* or using exclusive rights)
*/
- p->ai.num_want_fullload = CHANCE16(1, 5); // 20% chance
+ p->ai.num_want_fullload = Chance16(1, 5); // 20% chance
// p->ai.loco_id = INVALID_VEHICLE;
p->ai.order_list_blocks[0] = 0;
p->ai.order_list_blocks[1] = 1;