summaryrefslogtreecommitdiff
path: root/unmovable_cmd.c
diff options
context:
space:
mode:
authorludde <ludde@openttd.org>2005-07-13 19:51:31 +0000
committerludde <ludde@openttd.org>2005-07-13 19:51:31 +0000
commit2123deff13b3f23352ef82410e76705f9911c184 (patch)
tree24c82eee7c186426a35f3ee245d8d753a296d7e2 /unmovable_cmd.c
parentca9d0f984143f034725dce098e4a40e3589ed0f4 (diff)
downloadopenttd-2123deff13b3f23352ef82410e76705f9911c184.tar.xz
(svn r2560) Fix: various minor code changes.
Added RandomTile/RandomTileSeed functions to generate a random tile. Changed landscape routines so they don't assume that the Y map side is a power of two. (support for this is not complete, though) Changed some frequently used map macros to not compute the values each time. Silence some warnings on MSVC.
Diffstat (limited to 'unmovable_cmd.c')
-rw-r--r--unmovable_cmd.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/unmovable_cmd.c b/unmovable_cmd.c
index f18ebaa08..e44649bce 100644
--- a/unmovable_cmd.c
+++ b/unmovable_cmd.c
@@ -347,10 +347,7 @@ void GenerateUnmovables(void)
i = ScaleByMapSize(1000);
j = ScaleByMapSize(40); // maximum number of radio towers on the map
do {
- r = Random();
- tile = r % MapSize();
-// TILE_MASK seems to be not working correctly. Radio masts accumulate in one area.
-// tile = TILE_MASK(r);
+ tile = RandomTile();
if (IsTileType(tile, MP_CLEAR) && GetTileSlope(tile, &h) == 0 && h >= 32) {
if(!checkRadioTowerNearby(tile))
continue;