mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-06 16:51:37 +00:00
Merge pull request #110 from garyttierney/bugfix/walking-height-levels
Correct the height levels of steps in a path
This commit is contained in:
@@ -122,6 +122,7 @@ public final class WalkingQueue {
|
|||||||
*/
|
*/
|
||||||
public void pulse() {
|
public void pulse() {
|
||||||
Position position = mob.getPosition();
|
Position position = mob.getPosition();
|
||||||
|
int height = position.getHeight();
|
||||||
|
|
||||||
Direction firstDirection = Direction.NONE;
|
Direction firstDirection = Direction.NONE;
|
||||||
Direction secondDirection = Direction.NONE;
|
Direction secondDirection = Direction.NONE;
|
||||||
@@ -130,14 +131,14 @@ public final class WalkingQueue {
|
|||||||
if (next != null) {
|
if (next != null) {
|
||||||
previousPoints.add(next);
|
previousPoints.add(next);
|
||||||
firstDirection = Direction.between(position, next);
|
firstDirection = Direction.between(position, next);
|
||||||
position = next;
|
position = new Position(next.getX(), next.getY(), height);
|
||||||
|
|
||||||
if (running) {
|
if (running) {
|
||||||
next = points.poll();
|
next = points.poll();
|
||||||
if (next != null) {
|
if (next != null) {
|
||||||
previousPoints.add(next);
|
previousPoints.add(next);
|
||||||
secondDirection = Direction.between(position, next);
|
secondDirection = Direction.between(position, next);
|
||||||
position = next;
|
position = new Position(next.getX(), next.getY(), height);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user