Browse Source

shape

hull4
FatBoy-DOTC 12 months ago
parent
commit
343bfd1003
  1. 2
      src/engine/mobileAI/MobAI.java
  2. 4
      src/engine/mobileAI/utilities/PathingUtilities.java

2
src/engine/mobileAI/MobAI.java

@ -1350,7 +1350,7 @@ public class MobAI {
return; return;
} }
if(!mob.isPathing){ if(!mob.isPathing){
ArrayList<PathingUtilities.Node> path = PathingUtilities.getPath(mob, mob.loc,mob.destination); ArrayList<PathingUtilities.Node> path = PathingUtilities.getPath(mob, mob.destination);
if(path != null && path.size() > 0) if(path != null && path.size() > 0)
PathingUtilities.followPath(mob,path); PathingUtilities.followPath(mob,path);
} }

4
src/engine/mobileAI/utilities/PathingUtilities.java

@ -71,9 +71,9 @@ public class PathingUtilities {
} }
return closest; return closest;
} }
public static ArrayList<Node> getPath(AbstractCharacter mover, Vector3fImmutable start, Vector3fImmutable goal){ public static ArrayList<Node> getPath(AbstractCharacter mover, Vector3fImmutable goal){
ArrayList<Node> path = new ArrayList<>(); ArrayList<Node> path = new ArrayList<>();
Node startNode = getClosestNode(start); Node startNode = getClosestNode(mover.loc);
Node goalNode = getClosestNode(goal); Node goalNode = getClosestNode(goal);
if(goalNode == null) if(goalNode == null)
move(mover,goal); move(mover,goal);

Loading…
Cancel
Save