From 343bfd1003e6b39d3e20efbb0d47ea547bceb2fa Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Tue, 14 Nov 2023 22:50:37 -0600 Subject: [PATCH] shape --- src/engine/mobileAI/MobAI.java | 2 +- src/engine/mobileAI/utilities/PathingUtilities.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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);