(svn r26983) -Fix: Account for max_heightlevel when saving heightmaps.

This commit is contained in:
frosch 2014-10-09 19:52:07 +00:00
parent c3e286ae58
commit 9efb6be700

View File

@ -783,7 +783,7 @@ static void HeightmapCallback(void *userdata, void *buffer, uint y, uint pitch,
while (n > 0) { while (n > 0) {
TileIndex ti = TileXY(MapMaxX(), y); TileIndex ti = TileXY(MapMaxX(), y);
for (uint x = MapMaxX(); true; x--) { for (uint x = MapMaxX(); true; x--) {
*buf = 16 * TileHeight(ti); *buf = 256 * TileHeight(ti) / (1 + _settings_game.construction.max_heightlevel);
buf++; buf++;
if (x == 0) break; if (x == 0) break;
ti = TILE_ADDXY(ti, -1, 0); ti = TILE_ADDXY(ti, -1, 0);