From 2fb8f537512a60a84f60fcde820b459f1203b4a8 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Tue, 2 Apr 2024 12:33:01 -0400 Subject: [PATCH] Attack early exit --- src/engine/net/client/handlers/AttackCmdMsgHandler.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/engine/net/client/handlers/AttackCmdMsgHandler.java b/src/engine/net/client/handlers/AttackCmdMsgHandler.java index 46c96f96..a7a538a7 100644 --- a/src/engine/net/client/handlers/AttackCmdMsgHandler.java +++ b/src/engine/net/client/handlers/AttackCmdMsgHandler.java @@ -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);