summaryrefslogtreecommitdiff
path: root/ai/default
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-11-14 08:09:57 +0000
committertron <tron@openttd.org>2005-11-14 08:09:57 +0000
commit524fd25cbd2b32fd8166e196c5eab1f2f7e82a8a (patch)
tree80b15078ff5a1c09815ccb23f4c9e7629774dae4 /ai/default
parentb34de09e627fc5f8d7579c96c8b4290593c1dd32 (diff)
downloadopenttd-524fd25cbd2b32fd8166e196c5eab1f2f7e82a8a.tar.xz
(svn r3177) GB, CLRBIT, HASBIT, TOGGLEBIT
Diffstat (limited to 'ai/default')
-rw-r--r--ai/default/default.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ai/default/default.c b/ai/default/default.c
index 7f0ae2aa8..1d763e483 100644
--- a/ai/default/default.c
+++ b/ai/default/default.c
@@ -1086,9 +1086,9 @@ static void AiWantPassengerRoute(Player *p)
static void AiWantTrainRoute(Player *p)
{
- uint16 r;
+ uint16 r = GB(Random(), 0, 16);
+
p->ai.railtype_to_use = GetBestRailtype(p);
- r = (uint16)Random();
if (r > 0xD000) {
AiWantLongIndustryRoute(p);
@@ -1349,7 +1349,7 @@ static void AiWantPassengerRouteInsideTown(Player *p)
static void AiWantRoadRoute(Player *p)
{
- uint16 r = (uint16)Random();
+ uint16 r = GB(Random(), 0, 16);
if (r > 0x4000) {
AiWantLongRoadIndustryRoute(p);