timestamp sync over layers

master
Thomas Rudin 2018-08-18 10:26:47 +02:00
parent 7052b6a8cd
commit 76b59df91d
1 changed files with 6 additions and 2 deletions

View File

@ -118,6 +118,7 @@ public class UpdateChangedTilesJob implements Runnable {
running = true;
final int LIMIT = cfg.tilerendererUpdateMaxBlocks();
long newTimestamp = latestTimestamp;
for (Layer layer: layerCfg.layers) {
@ -163,9 +164,9 @@ public class UpdateChangedTilesJob implements Runnable {
Integer x = record.getPosx();
Integer z = record.getPosz();
if (record.getMtime() > latestTimestamp) {
if (record.getMtime() > newTimestamp) {
//Update timestamp
latestTimestamp = record.getMtime();
newTimestamp = record.getMtime();
}
TileInfo tileInfo = CoordinateResolver.fromCoordinates(x, z);
@ -185,6 +186,9 @@ public class UpdateChangedTilesJob implements Runnable {
}
}
//assign new timestamp
latestTimestamp = newTimestamp;
updatedTileKeys.clear();
//Second run with rendering