diff options
author | tron <tron@openttd.org> | 2005-10-03 21:20:01 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-10-03 21:20:01 +0000 |
commit | 6d7c7e67b2001716340698b44d3eb95de3c4cf24 (patch) | |
tree | 4379525d1560a92903c1fdc87cdbad70a36ea271 /town_cmd.c | |
parent | a4287a47b34c8f06322be63a8053bd96712db335 (diff) | |
download | openttd-6d7c7e67b2001716340698b44d3eb95de3c4cf24.tar.xz |
(svn r3010) Get rid of quite some dubious casts, either by using GB(), proper types or just removing them
Diffstat (limited to 'town_cmd.c')
-rw-r--r-- | town_cmd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/town_cmd.c b/town_cmd.c index 0c6615712..d2a14f59b 100644 --- a/town_cmd.c +++ b/town_cmd.c @@ -593,9 +593,9 @@ static void GrowTownInTile(TileIndex *tile_ptr, uint mask, int block, Town *t1) // Randomize new road block numbers a = block; b = block ^ 2; - r = (uint16)Random(); + r = GB(Random(), 0, 16); if (r <= 0x4000) do { - a = (int)Random() & 3; + a = GB(Random(), 0, 2); } while(a == b); if (!IsRoadAllowedHere(TILE_ADD(tile, ToTileIndexDiff(_roadblock_tileadd[a])), a)) { |