summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeterN <peter1138@openttd.org>2019-05-13 12:27:35 +0100
committerGitHub <noreply@github.com>2019-05-13 12:27:35 +0100
commit2d0352d67f1c9a6583b04a6bebb89520cf2bee29 (patch)
tree4a1cace9185bbfeadef8c68b4ec3e52a3b19d49a /src
parent38bb6b7d1b04e0e9402b489758bf7471d37cc36f (diff)
downloadopenttd-2d0352d67f1c9a6583b04a6bebb89520cf2bee29.tar.xz
Fix e8d397e4ee: Avoid using RemapCoords2 during savegame conversion. (#7588)
Diffstat (limited to 'src')
-rw-r--r--src/viewport.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/viewport.cpp b/src/viewport.cpp
index da1e01feb..534de090b 100644
--- a/src/viewport.cpp
+++ b/src/viewport.cpp
@@ -2142,7 +2142,7 @@ ViewportSignKdtreeItem ViewportSignKdtreeItem::MakeStation(StationID id)
item.id.station = id;
const Station *st = Station::Get(id);
- Point pt = RemapCoords2(TileX(st->xy) * TILE_SIZE, TileY(st->xy) * TILE_SIZE);
+ Point pt = RemapCoords(TileX(st->xy) * TILE_SIZE, TileY(st->xy) * TILE_SIZE, GetTileMaxZ(st->xy) * TILE_HEIGHT);
pt.y -= 32 * ZOOM_LVL_BASE;
if ((st->facilities & FACIL_AIRPORT) && st->airport.type == AT_OILRIG) pt.y -= 16 * ZOOM_LVL_BASE;
@@ -2163,7 +2163,7 @@ ViewportSignKdtreeItem ViewportSignKdtreeItem::MakeWaypoint(StationID id)
item.id.station = id;
const Waypoint *st = Waypoint::Get(id);
- Point pt = RemapCoords2(TileX(st->xy) * TILE_SIZE, TileY(st->xy) * TILE_SIZE);
+ Point pt = RemapCoords(TileX(st->xy) * TILE_SIZE, TileY(st->xy) * TILE_SIZE, GetTileMaxZ(st->xy) * TILE_HEIGHT);
pt.y -= 32 * ZOOM_LVL_BASE;