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