Add /dynmap updaterender command - renders starting at selected location until map edge hit OR until rendered tiles match existing tiles (i.e. no changes)

This commit is contained in:
Mike Primm 2011-12-30 15:35:57 +08:00 committed by mikeprimm
parent cefcae2437
commit 8c9733b73f
6 changed files with 103 additions and 51 deletions

View file

@ -1184,8 +1184,6 @@ public class IsoHDPerspective implements HDPerspective {
File f = new File(tile.getDynmapWorld().worldtilepath, fname);
FileLockManager.getWriteLock(f);
try {
if(rendered[i])
renderone = true;
if((!f.exists()) || (crc != hashman.getImageHashCode(tile.getKey(prefix), null, tile.tx, tile.ty))) {
/* Wrap buffer as buffered image */
Debug.debug("saving image " + f.getPath());
@ -1202,6 +1200,7 @@ public class IsoHDPerspective implements HDPerspective {
hashman.updateHashCode(tile.getKey(prefix), null, tile.tx, tile.ty, crc);
tile.getDynmapWorld().enqueueZoomOutUpdate(f);
tile_update = true;
renderone = true;
}
else {
Debug.debug("skipping image " + f.getPath() + " - hash match");
@ -1234,6 +1233,7 @@ public class IsoHDPerspective implements HDPerspective {
hashman.updateHashCode(tile.getKey(prefix), "day", tile.tx, tile.ty, crc);
tile.getDynmapWorld().enqueueZoomOutUpdate(f);
tile_update = true;
renderone = true;
}
else {
Debug.debug("skipping image " + f.getPath() + " - hash match");