멀티플레이에서 플레이어가 공격 시, 데미지가 플레이어 수만큼 곱해지는 문제 수정
This commit is contained in:
@@ -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<ITeamMember>();
|
||||
_equipmentSocket = GetComponent<EquipmentSocket>();
|
||||
_playerStats = GetComponent<PlayerStats>();
|
||||
_networkPlayerController = GetComponent<NetworkPlayerController>();
|
||||
}
|
||||
|
||||
public bool CanExecute(ulong playerId)
|
||||
@@ -163,6 +165,10 @@ namespace Northbound
|
||||
|
||||
public void OnAttackHit()
|
||||
{
|
||||
// 로컬 플레이어만 공격 수행 (중복 데미지 방지)
|
||||
if (_networkPlayerController != null && !_networkPlayerController.IsLocalPlayer)
|
||||
return;
|
||||
|
||||
PerformAttack();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user