Fix initial zoomout processing (unnecessary updates), extra tile invalidates

This commit is contained in:
Mike Primm 2011-08-15 06:43:08 +08:00 committed by mikeprimm
parent 6860d8952f
commit 4cb5b9a956
6 changed files with 53 additions and 19 deletions

View file

@ -52,7 +52,7 @@ public class KzedMapTile extends MapTile {
@Override
public int hashCode() {
return getFilename().hashCode() ^ getWorld().hashCode();
return px ^ py ^ map.getName().hashCode() ^ getWorld().getName().hashCode();
}
@Override
@ -60,11 +60,11 @@ public class KzedMapTile extends MapTile {
if (obj instanceof KzedMapTile) {
return equals((KzedMapTile) obj);
}
return super.equals(obj);
return false;
}
public boolean equals(KzedMapTile o) {
return o.px == px && o.py == py && o.getWorld().equals(getWorld());
return o.px == px && o.py == py && (o.map == map) && (o.getWorld() == getWorld());
}
public String getKey() {