Browse Source

aggro check for non agressive mobs

master
FatBoy-DOTC 1 year ago
parent
commit
c47d1b7823
  1. 2
      src/engine/ai/MobileFSM.java

2
src/engine/ai/MobileFSM.java

@ -486,7 +486,9 @@ public class MobileFSM {
AttackTarget(mob, mob.getCombatTarget()); AttackTarget(mob, mob.getCombatTarget());
} }
private static void CheckToSendMobHome(Mob mob) { private static void CheckToSendMobHome(Mob mob) {
if(mob.BehaviourType.isAgressive) {
CheckForAggro(mob); CheckForAggro(mob);
}
if(mob.getCombatTarget() != null && CombatUtilities.inRange2D(mob,mob.getCombatTarget(),MBServerStatics.AI_BASE_AGGRO_RANGE * 0.5f)){ if(mob.getCombatTarget() != null && CombatUtilities.inRange2D(mob,mob.getCombatTarget(),MBServerStatics.AI_BASE_AGGRO_RANGE * 0.5f)){
return; return;
} }

Loading…
Cancel
Save