health var updates correctly on client when hit by projectile
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user