summaryrefslogtreecommitdiff
path: root/roadveh_cmd.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-11-14 09:21:05 +0000
committertron <tron@openttd.org>2005-11-14 09:21:05 +0000
commit5fa6b7eb06dd91aabde074acffab89ce00283e9e (patch)
tree0bb50211293afdb1d1e5d7c78f8c2e4d5a11506e /roadveh_cmd.c
parent6124ee09747fdac32a0b3af8616fd7813e0fe746 (diff)
downloadopenttd-5fa6b7eb06dd91aabde074acffab89ce00283e9e.tar.xz
(svn r3179) - RandomRange() and RandomTile() instead of home brewed versions
- CHANCE*() instead of mumbling strange numbers
Diffstat (limited to 'roadveh_cmd.c')
-rw-r--r--roadveh_cmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/roadveh_cmd.c b/roadveh_cmd.c
index 421e809cc..bc29715a9 100644
--- a/roadveh_cmd.c
+++ b/roadveh_cmd.c
@@ -990,7 +990,7 @@ static int PickRandomBit(uint bits)
num++;
} while (b >>= 1);
- num = GB(Random(), 0, 16) * num >> 16;
+ num = RandomRange(num);
for(i=0; !((bits & 1) && ((int)--num) < 0); bits>>=1,i++);
return i;