summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2014-10-09 19:52:07 +0000
committerfrosch <frosch@openttd.org>2014-10-09 19:52:07 +0000
commit7979f9a47509786e11ad47548cd8b0b0257d1280 (patch)
tree293cbbb0725fc841a7545cd1f5135e1c18fa0183
parent7edec859bda7ffe3c907c88f6260709f39baa8b1 (diff)
downloadopenttd-7979f9a47509786e11ad47548cd8b0b0257d1280.tar.xz
(svn r26983) -Fix: Account for max_heightlevel when saving heightmaps.
-rw-r--r--src/screenshot.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/screenshot.cpp b/src/screenshot.cpp
index 4921378f8..a24cc6b21 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);