From a8f13e9dcab97e8fbc8099daebec81ddb4ed5637 Mon Sep 17 00:00:00 2001 From: CylonicRaider Date: Sun, 12 Dec 2021 21:26:26 +0100 Subject: [PATCH] Fix boosted top-down-view map artifacts --- .../src/main/java/org/dynmap/hdmap/IsoHDPerspective.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DynmapCore/src/main/java/org/dynmap/hdmap/IsoHDPerspective.java b/DynmapCore/src/main/java/org/dynmap/hdmap/IsoHDPerspective.java index 5e213c8a..aeebe820 100644 --- a/DynmapCore/src/main/java/org/dynmap/hdmap/IsoHDPerspective.java +++ b/DynmapCore/src/main/java/org/dynmap/hdmap/IsoHDPerspective.java @@ -1248,8 +1248,8 @@ public class IsoHDPerspective implements HDPerspective { for(int x = 0; x < tileWidth * sizescale; x++) { ps.px = x; for(int y = 0; y < tileHeight * sizescale; y++) { - ps.top.x = ps.bottom.x = xbase + ((double)x)/sizescale + 0.5; /* Start at center of pixel at Y=height+0.5, bottom at Y=-0.5 */ - ps.top.y = ps.bottom.y = ybase + ((double)y)/sizescale + 0.5; + ps.top.x = ps.bottom.x = xbase + (x + 0.5) / sizescale; /* Start at center of pixel at Y=height+0.5, bottom at Y=-0.5 */ + ps.top.y = ps.bottom.y = ybase + (y + 0.5) / sizescale; ps.top.z = height + 0.5; ps.bottom.z = miny - 0.5; map_to_world.transform(ps.top); /* Transform to world coordinates */ map_to_world.transform(ps.bottom);