Working on netowrked projectiles
This commit is contained in:
@@ -50,11 +50,10 @@ void ADDICharacter::Tick(float DeltaTime)
|
||||
|
||||
void ADDICharacter::OnHit(UPrimitiveComponent* HitComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp, FVector NormalImpulse, const FHitResult& Hit)
|
||||
{
|
||||
if (OtherActor->Owner == this)
|
||||
return;
|
||||
|
||||
AProjectileBase* Projectile = Cast<AProjectileBase>(OtherActor);
|
||||
|
||||
if (HealthComponent && Projectile)
|
||||
HealthComponent->TakeDamage(10);
|
||||
}
|
||||
|
||||
void ADDICharacter::TakeDamage(int Damage)
|
||||
{
|
||||
HealthComponent->TakeDamage(Damage);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user