forked from mirror/OpenTTD
(svn r3179) - RandomRange() and RandomTile() instead of home brewed versions
- CHANCE*() instead of mumbling strange numbers
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user