Swapped the order of checks within canSprintFromDescendInto

This commit is contained in:
Echocage 2022-06-27 15:06:27 -05:00
parent 17a2aa42e9
commit 2741fc2683

View File

@ -536,12 +536,12 @@ public class PathExecutor implements IPathExecutor, Helper {
} }
private static boolean canSprintFromDescendInto(IPlayerContext ctx, IMovement current, IMovement next) { private static boolean canSprintFromDescendInto(IPlayerContext ctx, IMovement current, IMovement next) {
if (next instanceof MovementDescend && next.getDirection().equals(current.getDirection())) {
return true;
}
if (!MovementHelper.canWalkOn(ctx, current.getDest().add(current.getDirection()))) { if (!MovementHelper.canWalkOn(ctx, current.getDest().add(current.getDirection()))) {
return false; return false;
} }
if (next instanceof MovementDescend && next.getDirection().equals(current.getDirection())) {
return true;
}
if (next instanceof MovementTraverse && next.getDirection().down().equals(current.getDirection())) { if (next instanceof MovementTraverse && next.getDirection().down().equals(current.getDirection())) {
return true; return true;
} }