Check if Hit Actor is dead when displaying hitmarker
This commit is contained in:
parent
2a33897198
commit
e97d370d23
|
@ -342,12 +342,14 @@ void APlayerCharacter::ProcessHits(TArray<FHitResult> hits)
|
|||
{
|
||||
healthComponent->TakeDamage(Hit.GetActor(), CurrentWeapon->GetWeaponProperties()->WeaponDamage, nullptr,
|
||||
GetController(), this);
|
||||
|
||||
if (!healthComponent->GetIsDead())
|
||||
{
|
||||
OnEnemyHit.ExecuteIfBound();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void APlayerCharacter::OnDamaged()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue