diff --git a/src/engine/mobileAI/MobAI.java b/src/engine/mobileAI/MobAI.java index 267a3e50..758aac69 100644 --- a/src/engine/mobileAI/MobAI.java +++ b/src/engine/mobileAI/MobAI.java @@ -1350,7 +1350,7 @@ public class MobAI { return; } if(!mob.isPathing){ - ArrayList path = PathingUtilities.getPath(mob, mob.loc,mob.destination); + ArrayList path = PathingUtilities.getPath(mob, mob.destination); if(path != null && path.size() > 0) PathingUtilities.followPath(mob,path); } diff --git a/src/engine/mobileAI/utilities/PathingUtilities.java b/src/engine/mobileAI/utilities/PathingUtilities.java index 7f1d5cf6..c1727cf8 100644 --- a/src/engine/mobileAI/utilities/PathingUtilities.java +++ b/src/engine/mobileAI/utilities/PathingUtilities.java @@ -71,9 +71,9 @@ public class PathingUtilities { } return closest; } - public static ArrayList getPath(AbstractCharacter mover, Vector3fImmutable start, Vector3fImmutable goal){ + public static ArrayList getPath(AbstractCharacter mover, Vector3fImmutable goal){ ArrayList path = new ArrayList<>(); - Node startNode = getClosestNode(start); + Node startNode = getClosestNode(mover.loc); Node goalNode = getClosestNode(goal); if(goalNode == null) move(mover,goal);