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

@ -538,6 +538,22 @@ public class FlatMap extends MapType {
return map.getAdjecentTiles(this);
}
@Override
public int hashCode() {
return x ^ y ^ size ^ map.getName().hashCode();
}
@Override
public boolean equals(Object x) {
if(x instanceof FlatMapTile) {
return equals((FlatMapTile)x);
}
return false;
}
public boolean equals(FlatMapTile o) {
return (o.x == x) && (o.y == y) && (o.map == map);
}
@Override
public String getKey() {
return world.world.getName() + "." + map.getPrefix();