From fca9b7dccbaf25cce56f3eea4a3d6c8146d3634c Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sat, 22 Jul 2023 18:58:55 -0500 Subject: [PATCH] cleanup and finalize --- src/engine/ai/MobileFSM.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/engine/ai/MobileFSM.java b/src/engine/ai/MobileFSM.java index ac4699ff..4513dee8 100644 --- a/src/engine/ai/MobileFSM.java +++ b/src/engine/ai/MobileFSM.java @@ -544,7 +544,7 @@ public class MobileFSM { if (mob.getCombatTarget() == null) { return; } - if (mob.getCombatTarget().getObjectType().equals(Enum.GameObjectType.PlayerCharacter) && MovementUtilities.inRangeDropAggro(mob, (PlayerCharacter) mob.getCombatTarget()) == false) { + if (mob.getCombatTarget().getObjectType().equals(Enum.GameObjectType.PlayerCharacter) && MovementUtilities.inRangeDropAggro(mob, (PlayerCharacter) mob.getCombatTarget()) == false && mob.BehaviourType.ordinal() != Enum.MobBehaviourType.Pet1.ordinal()) { mob.setCombatTarget(null); if (mob.isCombat()) { mob.setCombat(false); @@ -604,10 +604,6 @@ public class MobileFSM { private static void chaseTarget(Mob mob) { mob.updateMovementState(); - if (mob.playerAgroMap.containsKey(mob.getCombatTarget().getObjectUUID()) == false) { - mob.setCombatTarget(null); - return; - } if (CombatUtilities.inRange2D(mob, mob.getCombatTarget(), mob.getRange()) == false) { if (mob.getRange() > 15) { mob.destination = mob.getCombatTarget().getLoc(); @@ -678,9 +674,6 @@ public class MobileFSM { mob.killCharacter("no owner"); } } - if (mob.getCombatTarget() != null) - //if(!mob.getCombatTarget().isAlive() || mob.getCombatTarget().getLoc().distanceSquared(mob.getOwner().getLoc()) > 75) - //mob.setCombatTarget(null); if (MovementUtilities.canMove(mob) && mob.BehaviourType.canRoam) CheckMobMovement(mob); CheckForAttack(mob);