diff --git a/Assets/Scripts/AttackAction.cs b/Assets/Scripts/AttackAction.cs index db9ac1b..7e5668e 100644 --- a/Assets/Scripts/AttackAction.cs +++ b/Assets/Scripts/AttackAction.cs @@ -32,6 +32,7 @@ namespace Northbound private bool _isAttacking = false; private bool _isWeaponEquipped = false; private PlayerStats _playerStats; + private NetworkPlayerController _networkPlayerController; private void Awake() { @@ -39,6 +40,7 @@ namespace Northbound _teamMember = GetComponent(); _equipmentSocket = GetComponent(); _playerStats = GetComponent(); + _networkPlayerController = GetComponent(); } public bool CanExecute(ulong playerId) @@ -163,6 +165,10 @@ namespace Northbound public void OnAttackHit() { + // 로컬 플레이어만 공격 수행 (중복 데미지 방지) + if (_networkPlayerController != null && !_networkPlayerController.IsLocalPlayer) + return; + PerformAttack(); }