summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2017-02-05 17:54:46 +0000
committerfrosch <frosch@openttd.org>2017-02-05 17:54:46 +0000
commitae815ecf1b64b411c4fa3723cce92099d49d1b1e (patch)
tree7ecffb7aef33b61070996fd8203bd4f1bf17c8fa
parent505ba65922c4d7c81e6dbd8d06274652380422ec (diff)
downloadopenttd-ae815ecf1b64b411c4fa3723cce92099d49d1b1e.tar.xz
(svn r27743) -Fix [FS#6537]: Extra viewports did not center on the selected tile. (hackalittlebit)
-rw-r--r--src/viewport_gui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/viewport_gui.cpp b/src/viewport_gui.cpp
index 90b0e1468..cbd300dec 100644
--- a/src/viewport_gui.cpp
+++ b/src/viewport_gui.cpp
@@ -71,7 +71,7 @@ public:
pt.x = w->viewport->scrollpos_x + w->viewport->virtual_width / 2;
pt.y = w->viewport->scrollpos_y + w->viewport->virtual_height / 2;
} else {
- pt = RemapCoords(TileX(tile) * TILE_SIZE + TILE_SIZE / 2, TileY(tile) * TILE_SIZE + TILE_SIZE / 2, TileHeight(tile));
+ pt = RemapCoords(TileX(tile) * TILE_SIZE + TILE_SIZE / 2, TileY(tile) * TILE_SIZE + TILE_SIZE / 2, TilePixelHeight(tile));
}
this->viewport->scrollpos_x = pt.x - this->viewport->virtual_width / 2;