From 7289f9e00670d736dd2ceadc7547c2cf5b832a07 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Wed, 8 Jan 2025 21:06:02 -0600 Subject: [PATCH] Easy AI --- src/engine/mobileAI/BehaviourFiles/PlayerPet.java | 4 +--- src/engine/mobileAI/Threads/MobAIThread.java | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/engine/mobileAI/BehaviourFiles/PlayerPet.java b/src/engine/mobileAI/BehaviourFiles/PlayerPet.java index 3730800c..73395e7e 100644 --- a/src/engine/mobileAI/BehaviourFiles/PlayerPet.java +++ b/src/engine/mobileAI/BehaviourFiles/PlayerPet.java @@ -31,10 +31,8 @@ public class PlayerPet { pet.despawn(); return; case patrolling: - if(pet.loc.distanceSquared(pet.getOwner().loc) > 25){ + if(pet.loc.distanceSquared(pet.getOwner().loc) > 90 && !pet.isMoving()){ MovementUtilities.aiMove(pet,pet.getOwner().loc,false); - } else if (pet.isMoving()) { - pet.stopMovement(pet.getMovementLoc()); } return; case attacking: diff --git a/src/engine/mobileAI/Threads/MobAIThread.java b/src/engine/mobileAI/Threads/MobAIThread.java index 8266329b..8835d9e6 100644 --- a/src/engine/mobileAI/Threads/MobAIThread.java +++ b/src/engine/mobileAI/Threads/MobAIThread.java @@ -34,7 +34,8 @@ public class MobAIThread implements Runnable{ try { if (mob != null) - EasyAI.aiRun(mob); + //EasyAI.aiRun(mob); + MobAI.DetermineAction(mob); } catch (Exception e) { Logger.error("Mob: " + mob.getName() + " UUID: " + mob.getObjectUUID() + " ERROR: " + e); e.printStackTrace();