mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-16 00:12:51 +00:00
(svn r15332) -Fix (r15190): terrain generated from heightmaps always was at sea level at both southern borders
This commit is contained in:
parent
6c1394121f
commit
3cb992de10
@ -331,8 +331,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 ((!_settings_game.construction.freeform_edges && DistanceFromEdge(tile) <= 1) ||
|
if ((!_settings_game.construction.freeform_edges && DistanceFromEdge(tile) <= 1) ||
|
||||||
(row < row_pad) || (row >= (height - row_pad - 1)) ||
|
(row < row_pad) || (row >= (height - row_pad - (_settings_game.construction.freeform_edges ? 0 : 1))) ||
|
||||||
(col < col_pad) || (col >= (width - col_pad - 1))) {
|
(col < col_pad) || (col >= (width - col_pad - (_settings_game.construction.freeform_edges ? 0 : 1)))) {
|
||||||
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
Block a user