From 68db45e9d383df36d614b3f7959b7e11e7a39874 Mon Sep 17 00:00:00 2001 From: Gary Tierney Date: Tue, 22 Dec 2015 03:56:38 +0000 Subject: [PATCH] Correct the height levels of steps in a path Makes sure that the steps in a path sent for a "Player Walk" message are on the same level as the players current position while being processed in the walking queue. --- game/src/main/org/apollo/game/model/entity/WalkingQueue.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/game/src/main/org/apollo/game/model/entity/WalkingQueue.java b/game/src/main/org/apollo/game/model/entity/WalkingQueue.java index 44fa4d0d..5dc0bb15 100644 --- a/game/src/main/org/apollo/game/model/entity/WalkingQueue.java +++ b/game/src/main/org/apollo/game/model/entity/WalkingQueue.java @@ -122,6 +122,7 @@ public final class WalkingQueue { */ public void pulse() { Position position = mob.getPosition(); + int height = position.getHeight(); Direction firstDirection = Direction.NONE; Direction secondDirection = Direction.NONE; @@ -130,14 +131,14 @@ public final class WalkingQueue { if (next != null) { previousPoints.add(next); firstDirection = Direction.between(position, next); - position = next; + position = new Position(next.getX(), next.getY(), height); if (running) { next = points.poll(); if (next != null) { previousPoints.add(next); secondDirection = Direction.between(position, next); - position = next; + position = new Position(next.getX(), next.getY(), height); } } }