health var updates correctly on client when hit by projectile

This commit is contained in:
2026-01-01 19:35:48 -05:00
parent ecd15c271f
commit 4662e6701a
4 changed files with 63 additions and 8 deletions

View File

@@ -46,9 +46,7 @@ void AProjectileBase::Tick(float DeltaTime)
void AProjectileBase::OnHit(UPrimitiveComponent* HitComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp, FVector NormalImpulse, const FHitResult& Hit)
{
if (ADDICharacter* character = Cast<ADDICharacter>(OtherActor))
{
// if (ADDICharacter* character = Cast<ADDICharacter>(OtherActor))
Destroy();
character->TakeDamage(10);
}
}