mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-05 00:38:14 +00:00
Add height checking to isWithinDistance check.
This commit is contained in:
@@ -221,7 +221,7 @@ public final class Position {
|
||||
public boolean isWithinDistance(Position other, int distance) {
|
||||
int deltaX = Math.abs(getX() - other.getX());
|
||||
int deltaY = Math.abs(getY() - other.getY());
|
||||
return deltaX <= distance && deltaY <= distance;
|
||||
return deltaX <= distance && deltaY <= distance && getHeight() == other.getHeight();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user