From ea919b4ecf5dd9b57a499b89fb15191c75ea07bf Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sun, 28 May 2023 10:13:49 -0500 Subject: [PATCH] mob aggro raneg when swapping hated target --- src/engine/ai/MobileFSM.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/ai/MobileFSM.java b/src/engine/ai/MobileFSM.java index 3d2c8484..96d074b0 100644 --- a/src/engine/ai/MobileFSM.java +++ b/src/engine/ai/MobileFSM.java @@ -727,7 +727,7 @@ public class MobileFSM { if(potentialTarget.equals(mob.getCombatTarget())){ continue; } - if(potentialTarget != null && potentialTarget.getHateValue() > CurrentHateValue){ + if(potentialTarget != null && potentialTarget.getHateValue() > CurrentHateValue && MovementUtilities.inRangeToAggro(mob, potentialTarget)){ CurrentHateValue = potentialTarget.getHateValue(); mostHatedTarget = potentialTarget; }