Browse Source

Attack early exit

combat-2
MagicBot 8 months ago
parent
commit
2fb8f53751
  1. 4
      src/engine/net/client/handlers/AttackCmdMsgHandler.java

4
src/engine/net/client/handlers/AttackCmdMsgHandler.java

@ -67,6 +67,10 @@ public class AttackCmdMsgHandler extends AbstractClientMsgHandler { @@ -67,6 +67,10 @@ public class AttackCmdMsgHandler extends AbstractClientMsgHandler {
playerCharacter.setCombatTarget(null);
return true; // cannot attack a null target
}
if (playerCharacter.getCombatTarget().equals(target))
return true;
//set sources target
playerCharacter.setCombatTarget(target);

Loading…
Cancel
Save