Added OnRep to health componenet
This commit is contained in:
@@ -101,4 +101,15 @@ void ADDICharacter::Server_CharacterHit_Implementation(UPrimitiveComponent* HitC
|
||||
bool ADDICharacter::Server_CharacterHit_Validate(UPrimitiveComponent* HitComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp, FVector NormalImpulse, const FHitResult& Hit)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
void ADDICharacter::OnRep_Health()
|
||||
{
|
||||
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, "Health Replicated");
|
||||
}
|
||||
|
||||
void ADDICharacter::GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const
|
||||
{
|
||||
Super::GetLifetimeReplicatedProps(OutLifetimeProps);
|
||||
DOREPLIFETIME(ADDICharacter, HealthComponent);
|
||||
}
|
||||
Reference in New Issue
Block a user