Fix initial zoomout processing (unnecessary updates), extra tile invalidates
This commit is contained in:
parent
6860d8952f
commit
4cb5b9a956
6 changed files with 53 additions and 19 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue