health var updates correctly on client when hit by projectile
This commit is contained in:
@@ -31,12 +31,24 @@ public:
|
||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Health")
|
||||
UDDIHealth* HealthComponent;
|
||||
|
||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Projectile")
|
||||
TSubclassOf<AActor> ProjectileClass;
|
||||
|
||||
/*Functions*/
|
||||
UFUNCTION()
|
||||
void OnHit(UPrimitiveComponent* HitComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp, FVector NormalImpulse, const FHitResult& Hit);
|
||||
|
||||
UFUNCTION()
|
||||
void TakeDamage(int Damage);
|
||||
|
||||
UFUNCTION(Server, Reliable, WithValidation, BlueprintCallable)
|
||||
void Server_SpawnProjectile();
|
||||
|
||||
UFUNCTION(Client, Reliable, WithValidation, BlueprintCallable)
|
||||
void Client_CharacterHit();
|
||||
|
||||
UFUNCTION(Server, Reliable, WithValidation, BlueprintCallable)
|
||||
void Server_CharacterHit(UPrimitiveComponent* HitComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp, FVector NormalImpulse, const FHitResult& Hit);
|
||||
|
||||
/*C++ only declarations*/
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user