Reset idler to prevent stopping creature during chase

This commit is contained in:
Jordan Irwin 2024-06-22 04:27:54 -07:00
parent 95bf1616ba
commit 858320c8e2
No known key found for this signature in database
GPG key ID: E3E358C2F44C290A

View file

@ -137,7 +137,7 @@ public class Creature extends NPC {
private final int attackTurn = Rand.rand(5);
private boolean isIdle;
private boolean isIdle = true;
/** The type of the damage this creature does */
private Nature damageType = Nature.CUT;
@ -915,6 +915,10 @@ public class Creature extends NPC {
healer.heal(this);
if (!this.getZone().getPlayerAndFriends().isEmpty()) {
if (strategy.hasValidTarget(this)) {
if (idler != null) {
// disable stop/direction queues so creature doesn't stop chasing
idler.reset();
}
strategy.getBetterAttackPosition(this);
this.applyMovement();
if (strategy.canAttackNow(this)) {