Use the latest subtile timestamp

for zoom out processing, instead of the render start time.
This commit is contained in:
BrainStone 2021-07-21 23:30:54 +02:00
parent ed0e5534fd
commit e3d5990dbe
No known key found for this signature in database
GPG Key ID: 66CCC234C2CEB306

View File

@ -128,7 +128,7 @@ public abstract class DynmapWorld {
private static final int[] stepseq = { 3, 1, 2, 0 }; private static final int[] stepseq = { 3, 1, 2, 0 };
private void processZoomFile(MapTypeState mts, MapStorageTile tile, boolean firstVariant) { private void processZoomFile(MapTypeState mts, MapStorageTile tile, boolean firstVariant) {
final long startTimestamp = System.currentTimeMillis(); long mostRecentTimestamp = 0;
int step = 1 << tile.zoom; int step = 1 << tile.zoom;
MapStorageTile ztile = tile.getZoomOutTile(); MapStorageTile ztile = tile.getZoomOutTile();
int width = 128, height = 128; int width = 128, height = 128;
@ -155,6 +155,7 @@ public abstract class DynmapWorld {
} }
try { try {
MapStorageTile.TileRead tr = tile1.read(); MapStorageTile.TileRead tr = tile1.read();
mostRecentTimestamp = Math.max(mostRecentTimestamp, tr.lastModified);
if (tr != null) { if (tr != null) {
BufferedImage im = null; BufferedImage im = null;
try { try {
@ -239,7 +240,7 @@ public abstract class DynmapWorld {
} }
} }
else /* if (!ztile.matchesHashCode(crc)) */ { else /* if (!ztile.matchesHashCode(crc)) */ {
ztile.write(crc, zIm, startTimestamp); ztile.write(crc, zIm, mostRecentTimestamp);
MapManager.mapman.pushUpdate(this, new Client.Tile(ztile.getURI())); MapManager.mapman.pushUpdate(this, new Client.Tile(ztile.getURI()));
enqueueZoomOutUpdate(ztile); enqueueZoomOutUpdate(ztile);
} }