forked from mirror/OpenTTD
(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.
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user