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
|
|
@ -40,7 +40,7 @@ public class HDMapTile extends MapTile {
|
|||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return perspective.getName().hashCode() ^ getWorld().hashCode();
|
||||
return tx ^ ty ^ perspective.getName().hashCode() ^ getWorld().getName().hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -48,11 +48,11 @@ public class HDMapTile extends MapTile {
|
|||
if (obj instanceof HDMapTile) {
|
||||
return equals((HDMapTile) obj);
|
||||
}
|
||||
return super.equals(obj);
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean equals(HDMapTile o) {
|
||||
return o.tx == tx && o.ty == ty && o.getWorld().equals(getWorld()) && (perspective.equals(o.perspective));
|
||||
return o.tx == tx && o.ty == ty && (perspective == o.perspective) && (o.getWorld() == getWorld());
|
||||
}
|
||||
|
||||
public String getKey() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue