From c4cb700738de0a858bc1307e6911fb690a192cbb Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Thu, 17 Jun 2021 17:22:50 +0100 Subject: [PATCH] Viewport map: Don't double draw north tile of bridge/tunnel --- src/viewport.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/viewport.cpp b/src/viewport.cpp index cec773c44a..7c02aadffa 100644 --- a/src/viewport.cpp +++ b/src/viewport.cpp @@ -3027,7 +3027,7 @@ static void ViewportMapDrawBridgeTunnel(Viewport * const vp, const TunnelBridgeT } TileIndexDiff delta = TileOffsByDiagDir(GetTunnelBridgeDirection(tile)); - for (; tile != tbtm->to_tile; tile += delta) { // For each tile + for (tile += delta; tile != tbtm->to_tile; tile += delta) { // For each tile const Point pt = RemapCoords(TileX(tile) * TILE_SIZE, TileY(tile) * TILE_SIZE, z); const int x = UnScaleByZoomLower(pt.x - _vd.dpi.left, _vd.dpi.zoom); if (IsInsideMM(x, 0, w)) {