From e3d5990dbeddbe9d6744221999766005eaf9943e Mon Sep 17 00:00:00 2001 From: BrainStone Date: Wed, 21 Jul 2021 23:30:54 +0200 Subject: [PATCH] Use the latest subtile timestamp for zoom out processing, instead of the render start time. --- DynmapCore/src/main/java/org/dynmap/DynmapWorld.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/DynmapCore/src/main/java/org/dynmap/DynmapWorld.java b/DynmapCore/src/main/java/org/dynmap/DynmapWorld.java index fef1498e..9e7fb453 100644 --- a/DynmapCore/src/main/java/org/dynmap/DynmapWorld.java +++ b/DynmapCore/src/main/java/org/dynmap/DynmapWorld.java @@ -128,7 +128,7 @@ public abstract class DynmapWorld { private static final int[] stepseq = { 3, 1, 2, 0 }; private void processZoomFile(MapTypeState mts, MapStorageTile tile, boolean firstVariant) { - final long startTimestamp = System.currentTimeMillis(); + long mostRecentTimestamp = 0; int step = 1 << tile.zoom; MapStorageTile ztile = tile.getZoomOutTile(); int width = 128, height = 128; @@ -155,6 +155,7 @@ public abstract class DynmapWorld { } try { MapStorageTile.TileRead tr = tile1.read(); + mostRecentTimestamp = Math.max(mostRecentTimestamp, tr.lastModified); if (tr != null) { BufferedImage im = null; try { @@ -239,7 +240,7 @@ public abstract class DynmapWorld { } } else /* if (!ztile.matchesHashCode(crc)) */ { - ztile.write(crc, zIm, startTimestamp); + ztile.write(crc, zIm, mostRecentTimestamp); MapManager.mapman.pushUpdate(this, new Client.Tile(ztile.getURI())); enqueueZoomOutUpdate(ztile); }