Browse Source

cant check range of target if theres no target

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

2
src/engine/ai/MobileFSM.java

@ -486,7 +486,7 @@ public class MobileFSM {
AttackTarget(mob, mob.getCombatTarget()); AttackTarget(mob, mob.getCombatTarget());
} }
private static void CheckToSendMobHome(Mob mob) { private static void CheckToSendMobHome(Mob mob) {
if(CombatUtilities.inRange2D(mob,mob.getCombatTarget(),mob.getRange() * 0.5f)){ if(mob.getCombatTarget() != null && CombatUtilities.inRange2D(mob,mob.getCombatTarget(),mob.getRange() * 0.5f)){
return; return;
} }
if (mob.isPlayerGuard() && !mob.despawned) { if (mob.isPlayerGuard() && !mob.despawned) {

Loading…
Cancel
Save