Fix problem with not replacing non-blank tiles with newly blank ones
This commit is contained in:
parent
bc31599378
commit
a143e5e73e
1 changed files with 41 additions and 41 deletions
|
|
@ -1124,13 +1124,14 @@ public class IsoHDPerspective implements HDPerspective {
|
|||
long crc = hashman.calculateTileHash(argb_buf[i]);
|
||||
boolean tile_update = false;
|
||||
String prefix = shaderstate[i].getMap().getPrefix();
|
||||
if(rendered[i]) {
|
||||
renderone = true;
|
||||
|
||||
MapType.ImageFormat fmt = shaderstate[i].getMap().getImageFormat();
|
||||
String fname = tile.getFilename(prefix, fmt);
|
||||
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, tile.tx, tile.ty))) {
|
||||
/* Wrap buffer as buffered image */
|
||||
Debug.debug("saving image " + f.getPath());
|
||||
|
|
@ -1191,7 +1192,6 @@ public class IsoHDPerspective implements HDPerspective {
|
|||
MapManager.mapman.updateStatistics(tile, prefix, true, tile_update, !rendered[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
return renderone;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue