summaryrefslogtreecommitdiff
path: root/unmovable_cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'unmovable_cmd.c')
-rw-r--r--unmovable_cmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/unmovable_cmd.c b/unmovable_cmd.c
index 137f66461..f94156424 100644
--- a/unmovable_cmd.c
+++ b/unmovable_cmd.c
@@ -262,7 +262,7 @@ void GenerateUnmovables()
j = 40; // limit of 40 radio towers per world.
do {
r = Random();
- tile = r % (TILES_X*TILES_Y);
+ tile = r % MapSize();
// TILE_MASK seems to be not working correctly. Radio masts accumulate in one area.
// tile = TILE_MASK(r);
if (IS_TILETYPE(tile, MP_CLEAR) && GetTileSlope(tile, &h) == 0 && h >= 32) {