Fixed monster random movement.
This commit is contained in:
@@ -492,7 +492,7 @@ public class AttackableAI extends CreatureAI
|
||||
}
|
||||
|
||||
// Order this attackable to return to its spawn because there's no target to attack
|
||||
if (!npc.isWalker() && ((getTarget() == null) || (getTarget().isPlayer() && ((!Config.ATTACKABLES_CAMP_PLAYER_CORPSES && getTarget().getActingPlayer().isAlikeDead()) || getTarget().getActingPlayer().getAppearance().isInvisible()))))
|
||||
if (!npc.isWalker() && (npc.getSpawn() != null) && (npc.calculateDistance2D(npc.getSpawn().getX(), npc.getSpawn().getY(), npc.getSpawn().getZ()) > Config.MAX_DRIFT_RANGE) && ((getTarget() == null) || (getTarget().isPlayer() && ((!Config.ATTACKABLES_CAMP_PLAYER_CORPSES && getTarget().getActingPlayer().isAlikeDead()) || getTarget().getActingPlayer().getAppearance().isInvisible()))))
|
||||
{
|
||||
npc.setWalking();
|
||||
npc.returnHome();
|
||||
|
Reference in New Issue
Block a user