Fixed combat movement regression that occurred when fighting large NPCs
This commit is contained in:
@@ -255,14 +255,6 @@ object InteractionListeners {
|
||||
|
||||
val destOverride = getOverride(type.ordinal, id, option) ?: getOverride(type.ordinal,node.id) ?: getOverride(type.ordinal,option.toLowerCase())
|
||||
|
||||
|
||||
if(option.toLowerCase() == "attack") //Attack needs special handling >.>
|
||||
{
|
||||
player.dispatch(InteractionEvent(node, option.toLowerCase()))
|
||||
method.invoke(player, node)
|
||||
return true
|
||||
}
|
||||
|
||||
if(type != IntType.ITEM && !isInstant(method)) {
|
||||
if(player.locks.isMovementLocked) return false
|
||||
player.pulseManager.run(object : MovementPulse(player, node, flag, destOverride) {
|
||||
|
||||
@@ -286,7 +286,7 @@ public abstract class MovementPulse extends Pulse {
|
||||
else if (loc == destination.getLocation()) loc = null;
|
||||
}
|
||||
|
||||
if (destination instanceof NPC)
|
||||
if (destination instanceof NPC && mover.getProperties().getCombatPulse().getVictim() != destination)
|
||||
loc = checkForEntityPathInterrupt(loc != null ? loc : destination.getLocation());
|
||||
|
||||
if (interactLocation == null)
|
||||
@@ -335,10 +335,10 @@ public abstract class MovementPulse extends Pulse {
|
||||
previousLoc = loc;
|
||||
}
|
||||
last = destination.getLocation();
|
||||
if (mover instanceof Player && mover.getAttribute("draw-intersect", false)) {
|
||||
clearHintIcon((Player) mover);
|
||||
registerHintIcon((Player) mover, interactLocation, 5);
|
||||
}
|
||||
if (mover instanceof Player && mover.getAttribute("draw-intersect", false)) {
|
||||
clearHintIcon((Player) mover);
|
||||
registerHintIcon((Player) mover, interactLocation, 5);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean checkAllowMovement() {
|
||||
|
||||
Reference in New Issue
Block a user