From 9efb6be70028b2aea364c38924dfd0ffdc050da6 Mon Sep 17 00:00:00 2001 From: frosch Date: Thu, 9 Oct 2014 19:52:07 +0000 Subject: [PATCH] (svn r26983) -Fix: Account for max_heightlevel when saving heightmaps. --- src/screenshot.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/screenshot.cpp b/src/screenshot.cpp index 4921378f8e..a24cc6b211 100644 --- a/src/screenshot.cpp +++ b/src/screenshot.cpp @@ -783,7 +783,7 @@ static void HeightmapCallback(void *userdata, void *buffer, uint y, uint pitch, while (n > 0) { TileIndex ti = TileXY(MapMaxX(), y); for (uint x = MapMaxX(); true; x--) { - *buf = 16 * TileHeight(ti); + *buf = 256 * TileHeight(ti) / (1 + _settings_game.construction.max_heightlevel); buf++; if (x == 0) break; ti = TILE_ADDXY(ti, -1, 0);