Give structs initial values

This commit is contained in:
baz 2025-08-26 13:45:40 +01:00
parent 810a833cb5
commit 6252377264
2 changed files with 9 additions and 9 deletions

View File

@ -12,19 +12,19 @@ struct FDamageInfo
GENERATED_BODY()
UPROPERTY()
AActor* DamagedActor;
TObjectPtr<AActor> DamagedActor = nullptr;
UPROPERTY()
float Damage;
float Damage = 0.0f;
UPROPERTY()
const UDamageType* DamageType;
const UDamageType* DamageType = nullptr;
UPROPERTY()
AController* InstigatedBy;
TObjectPtr<AController> InstigatedBy = nullptr;
UPROPERTY()
AActor* DamageCauser;
TObjectPtr<AActor> DamageCauser = nullptr;
};
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnDamageDelegate, FDamageInfo, damageInfo);

View File

@ -14,14 +14,14 @@ struct FExpTableRow : public FTableRowBase
GENERATED_BODY()
UPROPERTY(EditAnywhere, BlueprintReadWrite)
int Level;
int Level = 0;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
int ExpRequiredForNextLevel;
int ExpRequiredForNextLevel = 0;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
int CumulativeExpForNextLevel;
int CumulativeExpForNextLevel = 0;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
int CumulativeExpForPreviousLevel;
int CumulativeExpForPreviousLevel = 0;
};