mirror of https://github.com/OpenTTD/OpenTTD
(svn r7668) -Backport from trunk (r7555):
- off-by-one error due do truncation on division by 2 in heightmap code.release/0.5
parent
e00a47d47d
commit
737220f39c
|
@ -318,8 +318,8 @@ static void GrayscaleToMapHeights(uint img_width, uint img_height, byte *map)
|
||||||
|
|
||||||
/* Check if current tile is within the 1-pixel map edge or padding regions */
|
/* Check if current tile is within the 1-pixel map edge or padding regions */
|
||||||
if ((DistanceFromEdge(tile) <= 1) ||
|
if ((DistanceFromEdge(tile) <= 1) ||
|
||||||
(row < row_pad) || (row >= (height - row_pad)) ||
|
(row < row_pad) || (row >= (img_height + row_pad)) ||
|
||||||
(col < col_pad) || (col >= (width - col_pad))) {
|
(col < col_pad) || (col >= (img_width + col_pad))) {
|
||||||
SetTileHeight(tile, 0);
|
SetTileHeight(tile, 0);
|
||||||
} else {
|
} else {
|
||||||
/* Use nearest neighbor resizing to scale map data.
|
/* Use nearest neighbor resizing to scale map data.
|
||||||
|
|
Loading…
Reference in New Issue