File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
src/main/java/io/luna/game/model/mob/combat Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -99,11 +99,16 @@ public boolean run() {
9999 Position position = mob .getPosition ();
100100 CollisionManager collisionManager = mob .getWorld ().getCollisionManager ();
101101 InteractionPolicy interactionPolicy = combat .computeInteractionPolicy ();
102- if (!collisionManager .reached (position , target , interactionPolicy )) {
102+ boolean reachedTarget = collisionManager .reached (position , target , interactionPolicy );
103+ if (!reachedTarget ) {
103104 if (mob .getWalking ().isEmpty ()) {
104105 mob .getNavigator ().walkTo (target , Optional .empty (), false );
105106 }
106107 return false ;
108+ } else {
109+ if (!mob .getWalking ().isEmpty ()) {
110+ mob .getWalking ().clear ();
111+ }
107112 }
108113
109114 // TODO Players shouldn't be allowed to attack at all if on the same position? Unless it's magic/ranged?
You can’t perform that action at this time.
0 commit comments