health var updates correctly on client when hit by projectile

This commit is contained in:
2026-01-01 19:35:48 -05:00
parent dd3648f5b9
commit 3b9a02b3b1
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);
}
}