Cleared all TODOs related to custom logs
This commit is contained in:
parent
6c053954c8
commit
e0545d6323
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
#include "Components/OLSHealthComponent.h"
|
#include "Components/OLSHealthComponent.h"
|
||||||
|
|
||||||
|
#include "OLSLog.h"
|
||||||
#include "AbilitySystem/OLSAbilitySystemComponent.h"
|
#include "AbilitySystem/OLSAbilitySystemComponent.h"
|
||||||
#include "AbilitySystem/Attributes/OLSHealthAttributeSet.h"
|
#include "AbilitySystem/Attributes/OLSHealthAttributeSet.h"
|
||||||
#include "DataAssets/OLSGameDataAsset.h"
|
#include "DataAssets/OLSGameDataAsset.h"
|
||||||
@ -13,6 +14,8 @@
|
|||||||
#include "Net/UnrealNetwork.h"
|
#include "Net/UnrealNetwork.h"
|
||||||
#include "Systems/OLSAssetManager.h"
|
#include "Systems/OLSAssetManager.h"
|
||||||
|
|
||||||
|
DEFINE_LOG_CATEGORY(LogOLSHealthComponent);
|
||||||
|
|
||||||
UOLSHealthComponent::UOLSHealthComponent(const FObjectInitializer& objectInitializer)
|
UOLSHealthComponent::UOLSHealthComponent(const FObjectInitializer& objectInitializer)
|
||||||
: Super(objectInitializer)
|
: Super(objectInitializer)
|
||||||
{
|
{
|
||||||
@ -46,24 +49,29 @@ void UOLSHealthComponent::InitializeWithAbilitySystem(UOLSAbilitySystemComponent
|
|||||||
|
|
||||||
if (AbilitySystemComponent)
|
if (AbilitySystemComponent)
|
||||||
{
|
{
|
||||||
// @TODO replace this by our custom log.
|
OLS_LOG(LogOLSHealthComponent, Error,
|
||||||
// UE_LOG(LogLyra, Error, TEXT("LyraHealthComponent: Health component for owner [%s] has already been initialized with an ability system."), *GetNameSafe(Owner));
|
TEXT(
|
||||||
|
"LyraHealthComponent: Health component for owner [%s] has already been initialized with an ability system."
|
||||||
|
), GET_UOBJECT_NAME(owner));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
AbilitySystemComponent = asc;
|
AbilitySystemComponent = asc;
|
||||||
if (!AbilitySystemComponent)
|
if (!AbilitySystemComponent)
|
||||||
{
|
{
|
||||||
// @TODO replace this by our custom log.
|
OLS_LOG(LogOLSHealthComponent, Error,
|
||||||
// UE_LOG(LogLyra, Error, TEXT("LyraHealthComponent: Cannot initialize health component for owner [%s] with NULL ability system."), *GetNameSafe(Owner));
|
TEXT("Cannot initialize health component for owner [%s] with NULL ability system."),
|
||||||
|
GET_UOBJECT_NAME(owner));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
HealthSet = AbilitySystemComponent->GetSet<UOLSHealthAttributeSet>();
|
HealthSet = AbilitySystemComponent->GetSet<UOLSHealthAttributeSet>();
|
||||||
if (!HealthSet)
|
if (!HealthSet)
|
||||||
{
|
{
|
||||||
// @TODO replace this by our custom log.
|
OLS_LOG(LogOLSHealthComponent, Error,
|
||||||
// UE_LOG(LogLyra, Error, TEXT("LyraHealthComponent: Cannot initialize health component for owner [%s] with NULL health set on the ability system."), *GetNameSafe(Owner));
|
TEXT(
|
||||||
|
"LyraHealthComponent: Cannot initialize health component for owner [%s] with NULL health set on the ability system."
|
||||||
|
), GET_UOBJECT_NAME(owner));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -72,7 +80,7 @@ void UOLSHealthComponent::InitializeWithAbilitySystem(UOLSAbilitySystemComponent
|
|||||||
HealthSet->OnMaxHealthChanged.AddUObject(this, &ThisClass::HandleMaxHealthChanged);
|
HealthSet->OnMaxHealthChanged.AddUObject(this, &ThisClass::HandleMaxHealthChanged);
|
||||||
HealthSet->OnOutOfHealth.AddUObject(this, &ThisClass::HandleOutOfHealth);
|
HealthSet->OnOutOfHealth.AddUObject(this, &ThisClass::HandleOutOfHealth);
|
||||||
|
|
||||||
// TEMP: Reset attributes to default values. Eventually this will be driven by a spread sheet.
|
// TEMP: Reset attributes to default values. Eventually this will be driven by a spreadsheet.
|
||||||
AbilitySystemComponent->SetNumericAttributeBase(UOLSHealthAttributeSet::GetHealthAttribute(), HealthSet->GetMaxHealth());
|
AbilitySystemComponent->SetNumericAttributeBase(UOLSHealthAttributeSet::GetHealthAttribute(), HealthSet->GetMaxHealth());
|
||||||
|
|
||||||
ClearGameplayTags();
|
ClearGameplayTags();
|
||||||
@ -182,8 +190,10 @@ void UOLSHealthComponent::DamageSelfDestruct(bool isFellOutOfWorld)
|
|||||||
const TSubclassOf<UGameplayEffect> damageGE = UOLSAssetManager::GetSubclass(UOLSGameDataAsset::Get().DamageGameplayEffect_SetByCaller);
|
const TSubclassOf<UGameplayEffect> damageGE = UOLSAssetManager::GetSubclass(UOLSGameDataAsset::Get().DamageGameplayEffect_SetByCaller);
|
||||||
if (!damageGE)
|
if (!damageGE)
|
||||||
{
|
{
|
||||||
// @TODO: replace this with our custom log.
|
OLS_LOG(LogOLSHealthComponent, Error,
|
||||||
// UE_LOG(LogLyra, Error, TEXT("LyraHealthComponent: DamageSelfDestruct failed for owner [%s]. Unable to find gameplay effect [%s]."), *GetNameSafe(GetOwner()), *ULyraGameData::Get().DamageGameplayEffect_SetByCaller.GetAssetName());
|
TEXT("DamageSelfDestruct failed for owner [%s]. Unable to find gameplay effect [%s]."),
|
||||||
|
GET_UOBJECT_NAME(GetOwner()),
|
||||||
|
*UOLSGameDataAsset::Get().DamageGameplayEffect_SetByCaller.GetAssetName());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -192,8 +202,9 @@ void UOLSHealthComponent::DamageSelfDestruct(bool isFellOutOfWorld)
|
|||||||
|
|
||||||
if (!spec)
|
if (!spec)
|
||||||
{
|
{
|
||||||
// @TODO: replace this with our custom log.
|
OLS_LOG(LogOLSHealthComponent, Error,
|
||||||
// UE_LOG(LogLyra, Error, TEXT("LyraHealthComponent: DamageSelfDestruct failed for owner [%s]. Unable to make outgoing spec for [%s]."), *GetNameSafe(GetOwner()), *GetNameSafe(DamageGE));
|
TEXT("DamageSelfDestruct failed for owner [%s]. Unable to make outgoing spec for [%s]."),
|
||||||
|
GET_UOBJECT_NAME(GetOwner()), GET_UOBJECT_NAME(damageGE));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -356,11 +367,10 @@ void UOLSHealthComponent::OnRep_DeathState(EOLSDeathState oldDeathState)
|
|||||||
|
|
||||||
if (oldDeathState > newDeathState)
|
if (oldDeathState > newDeathState)
|
||||||
{
|
{
|
||||||
// The server is trying to set us back but we've already predicted past the server state.
|
OLS_LOG(LogOLSHealthComponent, Warning,
|
||||||
// @TODO replace this with our custom log.
|
TEXT("Predicted past server death state [%d] -> [%d] for owner [%s]."),
|
||||||
// UE_LOG(LogLyra, Warning,
|
(uint8)oldDeathState, (uint8)newDeathState, GET_UOBJECT_NAME(GetOwner()));
|
||||||
// TEXT("LyraHealthComponent: Predicted past server death state [%d] -> [%d] for owner [%s]."),
|
|
||||||
// (uint8)OldDeathState, (uint8)newDeathStateameSafe(GetOwner()));
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -377,9 +387,8 @@ void UOLSHealthComponent::OnRep_DeathState(EOLSDeathState oldDeathState)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// @TODO replace this with our custom log.
|
OLS_LOG(LogOLSHealthComponent, Error, TEXT("Invalid death transition [%d] -> [%d] for owner [%s]."),
|
||||||
// UE_LOG(LogLyra, Error, TEXT("LyraHealthComponent: Invalid death transition [%d] -> [%d] for owner [%s]."),
|
(uint8)oldDeathState, (uint8)newDeathState, GET_UOBJECT_NAME(GetOwner()));
|
||||||
// (uint8)OldDeathState, (uint8)newDeathStateameSafe(GetOwner()));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (oldDeathState == EOLSDeathState::DeathStarted)
|
else if (oldDeathState == EOLSDeathState::DeathStarted)
|
||||||
@ -390,9 +399,8 @@ void UOLSHealthComponent::OnRep_DeathState(EOLSDeathState oldDeathState)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// @TODO replace this with our custom log.
|
OLS_LOG(LogOLSHealthComponent, Error, TEXT("Invalid death transition [%d] -> [%d] for owner [%s]."),
|
||||||
// UE_LOG(LogLyra, Error, TEXT("LyraHealthComponent: Invalid death transition [%d] -> [%d] for owner [%s]."),
|
(uint8)oldDeathState, (uint8)newDeathState, GET_UOBJECT_NAME(GetOwner()));
|
||||||
// (uint8)OldDeathState, (uint8)newDeathStateameSafe(GetOwner()));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,6 +3,10 @@
|
|||||||
|
|
||||||
#include "DataAssets/OLSInputConfigDataAsset.h"
|
#include "DataAssets/OLSInputConfigDataAsset.h"
|
||||||
|
|
||||||
|
#include "OLSLog.h"
|
||||||
|
|
||||||
|
DEFINE_LOG_CATEGORY(LogOLSInputConfigDataAsset);
|
||||||
|
|
||||||
UOLSInputConfigDataAsset::UOLSInputConfigDataAsset(const FObjectInitializer& objectInitializer) : Super(objectInitializer)
|
UOLSInputConfigDataAsset::UOLSInputConfigDataAsset(const FObjectInitializer& objectInitializer) : Super(objectInitializer)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -21,8 +25,9 @@ const UInputAction* UOLSInputConfigDataAsset::FindNativeInputActionForTag(
|
|||||||
|
|
||||||
if (shouldLogNotFound)
|
if (shouldLogNotFound)
|
||||||
{
|
{
|
||||||
//Todo: replace this with our custom log.
|
OLS_LOG(LogOLSInputConfigDataAsset, Error,
|
||||||
//UE_LOG(LogLyra, Error, TEXT("Can't find NativeInputAction for InputTag [%s] on InputConfig [%s]."), *InputTag.ToString(), *GetNameSafe(this));
|
TEXT("Can't find NativeInputAction for InputTag [%s] on InputConfig [%s]."), GET_TAG_NAME(inputTag),
|
||||||
|
GET_UOBJECT_NAME(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
@ -32,19 +37,20 @@ const UInputAction* UOLSInputConfigDataAsset::FindAbilityInputActionForTag(
|
|||||||
const FGameplayTag& inputTag,
|
const FGameplayTag& inputTag,
|
||||||
bool shouldLogNotFound) const
|
bool shouldLogNotFound) const
|
||||||
{
|
{
|
||||||
for (const FOLSInputAction& action : AbilityInputActions)
|
for (const FOLSInputAction& action : AbilityInputActions)
|
||||||
{
|
{
|
||||||
if (action.InputAction && (action.InputTag == inputTag))
|
if (action.InputAction && (action.InputTag == inputTag))
|
||||||
{
|
{
|
||||||
return action.InputAction;
|
return action.InputAction;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (shouldLogNotFound)
|
if (shouldLogNotFound)
|
||||||
{
|
{
|
||||||
//Todo: replace this with our custom log.
|
OLS_LOG(LogOLSInputConfigDataAsset, Error,
|
||||||
//UE_LOG(LogLyra, Error, TEXT("Can't find AbilityInputAction for InputTag [%s] on InputConfig [%s]."), *InputTag.ToString(), *GetNameSafe(this));
|
TEXT("Can't find AbilityInputAction for InputTag [%s] on InputConfig [%s]."), GET_TAG_NAME(inputTag),
|
||||||
}
|
GET_UOBJECT_NAME(this));
|
||||||
|
}
|
||||||
return nullptr;
|
|
||||||
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
@ -3,9 +3,12 @@
|
|||||||
|
|
||||||
#include "ModularGameplayActors/OLSModularActor.h"
|
#include "ModularGameplayActors/OLSModularActor.h"
|
||||||
|
|
||||||
|
#include "OLSLog.h"
|
||||||
#include "AbilitySystem/OLSAbilitySystemComponent.h"
|
#include "AbilitySystem/OLSAbilitySystemComponent.h"
|
||||||
#include "Components/GameFrameworkComponentManager.h"
|
#include "Components/GameFrameworkComponentManager.h"
|
||||||
|
|
||||||
|
DEFINE_LOG_CATEGORY(LogOLSModularActor);
|
||||||
|
|
||||||
AOLSModularActor::AOLSModularActor(const FObjectInitializer& objectInitializer) : Super(objectInitializer)
|
AOLSModularActor::AOLSModularActor(const FObjectInitializer& objectInitializer) : Super(objectInitializer)
|
||||||
{
|
{
|
||||||
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it.
|
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it.
|
||||||
@ -48,8 +51,8 @@ void AOLSModularActor::PostInitProperties()
|
|||||||
|
|
||||||
if (AbilitySystemComponent)
|
if (AbilitySystemComponent)
|
||||||
{
|
{
|
||||||
//@Todo replace this log by our custom log.
|
OLS_LOG(LogOLSModularActor, Verbose, TEXT("PostInitProperties for %s - Setting up ASC Replication Mode to: %d"),
|
||||||
UE_LOG(LogTemp, Verbose, TEXT("PostInitProperties for %s - Setting up ASC Replication Mode to: %d"), *GetName(), ReplicationMode);
|
GET_UOBJECT_NAME(this), ReplicationMode);
|
||||||
AbilitySystemComponent->SetReplicationMode(ReplicationMode);
|
AbilitySystemComponent->SetReplicationMode(ReplicationMode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,10 +3,13 @@
|
|||||||
|
|
||||||
#include "ModularGameplayActors/OLSModularCharacter.h"
|
#include "ModularGameplayActors/OLSModularCharacter.h"
|
||||||
|
|
||||||
|
#include "OLSLog.h"
|
||||||
#include "AbilitySystem/OLSAbilitySystemComponent.h"
|
#include "AbilitySystem/OLSAbilitySystemComponent.h"
|
||||||
#include "Components/GameFrameworkComponentManager.h"
|
#include "Components/GameFrameworkComponentManager.h"
|
||||||
|
|
||||||
AOLSModularCharacter::AOLSModularCharacter(const FObjectInitializer& objectInitializer)
|
DEFINE_LOG_CATEGORY(LogOLSModularCharacter);
|
||||||
|
|
||||||
|
AOLSModularCharacter::AOLSModularCharacter(const FObjectInitializer& objectInitializer) : Super(objectInitializer)
|
||||||
{
|
{
|
||||||
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it.
|
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it.
|
||||||
PrimaryActorTick.bCanEverTick = true;
|
PrimaryActorTick.bCanEverTick = true;
|
||||||
@ -46,8 +49,9 @@ void AOLSModularCharacter::PostInitProperties()
|
|||||||
|
|
||||||
if (AbilitySystemComponent)
|
if (AbilitySystemComponent)
|
||||||
{
|
{
|
||||||
//@Todo replace this log by our custom log.
|
OLS_LOG(LogOLSModularCharacter, Verbose,
|
||||||
UE_LOG(LogTemp, Verbose, TEXT("PostInitProperties for %s - Setting up ASC Replication Mode to: %d"), *GetName(), ReplicationMode);
|
TEXT("PostInitProperties for %s - Setting up ASC Replication Mode to: %d"), GET_UOBJECT_NAME(this),
|
||||||
|
ReplicationMode);
|
||||||
AbilitySystemComponent->SetReplicationMode(ReplicationMode);
|
AbilitySystemComponent->SetReplicationMode(ReplicationMode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,9 +3,11 @@
|
|||||||
|
|
||||||
#include "ModularGameplayActors/OLSModularDefaultPawn.h"
|
#include "ModularGameplayActors/OLSModularDefaultPawn.h"
|
||||||
|
|
||||||
|
#include "OLSLog.h"
|
||||||
#include "AbilitySystem/OLSAbilitySystemComponent.h"
|
#include "AbilitySystem/OLSAbilitySystemComponent.h"
|
||||||
#include "Components/GameFrameworkComponentManager.h"
|
#include "Components/GameFrameworkComponentManager.h"
|
||||||
|
|
||||||
|
DEFINE_LOG_CATEGORY(LogOLSModularDefaultPawn);
|
||||||
|
|
||||||
// Sets default values
|
// Sets default values
|
||||||
AOLSModularDefaultPawn::AOLSModularDefaultPawn(const FObjectInitializer& objectInitializer) : Super(objectInitializer)
|
AOLSModularDefaultPawn::AOLSModularDefaultPawn(const FObjectInitializer& objectInitializer) : Super(objectInitializer)
|
||||||
@ -47,9 +49,9 @@ void AOLSModularDefaultPawn::PostInitProperties()
|
|||||||
Super::PostInitProperties();
|
Super::PostInitProperties();
|
||||||
if (AbilitySystemComponent)
|
if (AbilitySystemComponent)
|
||||||
{
|
{
|
||||||
//@Todo replace this log by our custom log.
|
OLS_LOG(LogOLSModularDefaultPawn, Verbose,
|
||||||
UE_LOG(LogTemp, Verbose, TEXT("PostInitProperties for %s - Setting up ASC Replication Mode to: %d"), *GetName(),
|
TEXT("PostInitProperties for %s - Setting up ASC Replication Mode to: %d"), GET_UOBJECT_NAME(this),
|
||||||
ReplicationMode);
|
ReplicationMode);
|
||||||
AbilitySystemComponent->SetReplicationMode(ReplicationMode);
|
AbilitySystemComponent->SetReplicationMode(ReplicationMode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,9 +3,12 @@
|
|||||||
|
|
||||||
#include "ModularGameplayActors/OLSModularPawn.h"
|
#include "ModularGameplayActors/OLSModularPawn.h"
|
||||||
|
|
||||||
|
#include "OLSLog.h"
|
||||||
#include "AbilitySystem/OLSAbilitySystemComponent.h"
|
#include "AbilitySystem/OLSAbilitySystemComponent.h"
|
||||||
#include "Components/GameFrameworkComponentManager.h"
|
#include "Components/GameFrameworkComponentManager.h"
|
||||||
|
|
||||||
|
DEFINE_LOG_CATEGORY(LogOLSModularPawn);
|
||||||
|
|
||||||
AOLSModularPawn::AOLSModularPawn(const FObjectInitializer& objectInitializer) : Super(objectInitializer)
|
AOLSModularPawn::AOLSModularPawn(const FObjectInitializer& objectInitializer) : Super(objectInitializer)
|
||||||
{
|
{
|
||||||
AbilitySystemComponent = CreateDefaultSubobject<UOLSAbilitySystemComponent>(TEXT("AbilitySystemComponent"));
|
AbilitySystemComponent = CreateDefaultSubobject<UOLSAbilitySystemComponent>(TEXT("AbilitySystemComponent"));
|
||||||
@ -35,11 +38,12 @@ void AOLSModularPawn::EndPlay(const EEndPlayReason::Type endPlayReason)
|
|||||||
void AOLSModularPawn::PostInitProperties()
|
void AOLSModularPawn::PostInitProperties()
|
||||||
{
|
{
|
||||||
Super::PostInitProperties();
|
Super::PostInitProperties();
|
||||||
|
|
||||||
if (AbilitySystemComponent)
|
if (AbilitySystemComponent)
|
||||||
{
|
{
|
||||||
//@Todo replace this log by our custom log.
|
OLS_LOG(LogOLSModularPawn, Verbose,
|
||||||
UE_LOG(LogTemp, Verbose, TEXT("PostInitProperties for %s - Setting up ASC Replication Mode to: %d"), *GetName(), ReplicationMode);
|
TEXT("PostInitProperties for %s - Setting up ASC Replication Mode to: %d"), GET_UOBJECT_NAME(this),
|
||||||
|
ReplicationMode);
|
||||||
AbilitySystemComponent->SetReplicationMode(ReplicationMode);
|
AbilitySystemComponent->SetReplicationMode(ReplicationMode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,10 +3,13 @@
|
|||||||
|
|
||||||
#include "ModularGameplayActors/OLSModularPlayerState.h"
|
#include "ModularGameplayActors/OLSModularPlayerState.h"
|
||||||
|
|
||||||
|
#include "OLSLog.h"
|
||||||
#include "AbilitySystem/OLSAbilitySystemComponent.h"
|
#include "AbilitySystem/OLSAbilitySystemComponent.h"
|
||||||
#include "Components/GameFrameworkComponentManager.h"
|
#include "Components/GameFrameworkComponentManager.h"
|
||||||
#include "Components/PlayerStateComponent.h"
|
#include "Components/PlayerStateComponent.h"
|
||||||
|
|
||||||
|
DEFINE_LOG_CATEGORY(LogOLSModularPlayerState);
|
||||||
|
|
||||||
AOLSModularPlayerState::AOLSModularPlayerState(const FObjectInitializer& objectInitializer) : Super(objectInitializer)
|
AOLSModularPlayerState::AOLSModularPlayerState(const FObjectInitializer& objectInitializer) : Super(objectInitializer)
|
||||||
{
|
{
|
||||||
// Create ability system component, and set it to be explicitly replicated
|
// Create ability system component, and set it to be explicitly replicated
|
||||||
@ -41,8 +44,9 @@ void AOLSModularPlayerState::PostInitProperties()
|
|||||||
|
|
||||||
if (AbilitySystemComponent)
|
if (AbilitySystemComponent)
|
||||||
{
|
{
|
||||||
//@Todo replace this log by our custom log.
|
OLS_LOG(LogOLSModularPlayerState, Verbose,
|
||||||
UE_LOG(LogTemp, Verbose, TEXT("PostInitProperties for %s - Setting up ASC Replication Mode to: %d"), *GetName(), ReplicationMode);
|
TEXT("PostInitProperties for %s - Setting up ASC Replication Mode to: %d"), GET_UOBJECT_NAME(this),
|
||||||
|
ReplicationMode);
|
||||||
AbilitySystemComponent->SetReplicationMode(ReplicationMode);
|
AbilitySystemComponent->SetReplicationMode(ReplicationMode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,9 +5,12 @@
|
|||||||
|
|
||||||
#include "AbilitySystemComponent.h"
|
#include "AbilitySystemComponent.h"
|
||||||
#include "AbilitySystemGlobals.h"
|
#include "AbilitySystemGlobals.h"
|
||||||
|
#include "OLSLog.h"
|
||||||
#include "Components/GameFrameworkComponentManager.h"
|
#include "Components/GameFrameworkComponentManager.h"
|
||||||
#include "GameFramework/PlayerState.h"
|
#include "GameFramework/PlayerState.h"
|
||||||
|
|
||||||
|
DEFINE_LOG_CATEGORY(LogOLSModularPlayerStateCharacter);
|
||||||
|
|
||||||
AOLSModularPlayerStateCharacter::AOLSModularPlayerStateCharacter(const FObjectInitializer& objectInitializer) : Super(objectInitializer)
|
AOLSModularPlayerStateCharacter::AOLSModularPlayerStateCharacter(const FObjectInitializer& objectInitializer) : Super(objectInitializer)
|
||||||
{
|
{
|
||||||
SetMinNetUpdateFrequency(33.f);
|
SetMinNetUpdateFrequency(33.f);
|
||||||
@ -40,8 +43,9 @@ void AOLSModularPlayerStateCharacter::PostInitProperties()
|
|||||||
|
|
||||||
if (AbilitySystemComponent.IsValid())
|
if (AbilitySystemComponent.IsValid())
|
||||||
{
|
{
|
||||||
//@Todo replace this log by our custom log.
|
OLS_LOG(LogOLSModularPlayerStateCharacter, Verbose,
|
||||||
UE_LOG(LogTemp, Verbose, TEXT("PostInitProperties for %s - Setting up ASC Replication Mode to: %d"), *GetName(), ReplicationMode);
|
TEXT("PostInitProperties for %s - Setting up ASC Replication Mode to: %d"), GET_UOBJECT_NAME(this),
|
||||||
|
ReplicationMode);
|
||||||
AbilitySystemComponent->SetReplicationMode(ReplicationMode);
|
AbilitySystemComponent->SetReplicationMode(ReplicationMode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
#include "Player/OLSPlayerState.h"
|
#include "Player/OLSPlayerState.h"
|
||||||
|
|
||||||
|
#include "OLSLog.h"
|
||||||
#include "AbilitySystem/OLSAbilitySystemComponent.h"
|
#include "AbilitySystem/OLSAbilitySystemComponent.h"
|
||||||
#include "AbilitySystem/Attributes/OLSCombatAttributeSet.h"
|
#include "AbilitySystem/Attributes/OLSCombatAttributeSet.h"
|
||||||
#include "AbilitySystem/Attributes/OLSHealthAttributeSet.h"
|
#include "AbilitySystem/Attributes/OLSHealthAttributeSet.h"
|
||||||
@ -15,6 +16,8 @@
|
|||||||
|
|
||||||
#include UE_INLINE_GENERATED_CPP_BY_NAME(OLSPlayerState)
|
#include UE_INLINE_GENERATED_CPP_BY_NAME(OLSPlayerState)
|
||||||
|
|
||||||
|
DEFINE_LOG_CATEGORY(LogOLSPlayerState);
|
||||||
|
|
||||||
const FName AOLSPlayerState::NAME_OLSAbilityReady("OLSAbilitiesReady");
|
const FName AOLSPlayerState::NAME_OLSAbilityReady("OLSAbilitiesReady");
|
||||||
|
|
||||||
AOLSPlayerState::AOLSPlayerState(const FObjectInitializer& objectInitializer) : Super(objectInitializer)
|
AOLSPlayerState::AOLSPlayerState(const FObjectInitializer& objectInitializer) : Super(objectInitializer)
|
||||||
@ -44,8 +47,9 @@ void AOLSPlayerState::SetPawnData(const UOLSPawnDataAsset* pawnData)
|
|||||||
|
|
||||||
if (PawnData)
|
if (PawnData)
|
||||||
{
|
{
|
||||||
// @Todo: replace this by our custom log.
|
OLS_LOG(LogOLSPlayerState, Error,
|
||||||
// UE_LOG(LogLyra, Error, TEXT("Trying to set PawnData [%s] on player state [%s] that already has valid PawnData [%s]."), *GetNameSafe(InPawnData), *GetNameSafe(this), *GetNameSafe(PawnData));
|
TEXT("Trying to set PawnData [%s] on player state [%s] that already has valid PawnData [%s]."),
|
||||||
|
GET_UOBJECT_NAME(pawnData), GET_UOBJECT_NAME(this), GET_UOBJECT_NAME(PawnData));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -94,8 +98,7 @@ void AOLSPlayerState::OnExperienceLoaded(const UOLSExperienceDefinitionDataAsset
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// @T ODO: Replace this with our custom.
|
OLS_LOG(LogOLSPlayerState, Error, TEXT("Unable to find PawnData to initialize player state [%s]!"), GET_UOBJECT_NAME(this));
|
||||||
// UE_LOG(LogLyra, Error, TEXT("ALyraPlayerState::OnExperienceLoaded(): Unable to find PawnData to initialize player state [%s]!"), *GetNameSafe(this));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,8 @@ DECLARE_MULTICAST_DELEGATE_OneParam(FOLSDeathEventNativeDelegate, class AActor*
|
|||||||
DECLARE_DYNAMIC_MULTICAST_DELEGATE_FourParams(FOLSAttributeChangedDynamicDelegate, class UOLSHealthComponent*, healthComponent, float, oldValue, float, newValue, class AActor*, instigator);
|
DECLARE_DYNAMIC_MULTICAST_DELEGATE_FourParams(FOLSAttributeChangedDynamicDelegate, class UOLSHealthComponent*, healthComponent, float, oldValue, float, newValue, class AActor*, instigator);
|
||||||
DECLARE_MULTICAST_DELEGATE_FourParams(FOLSAttributeChangedNativeDelegate, class UOLSHealthComponent* /* healthComponent */, float /* oldValue */, float /* newValue */, class AActor* /* instigator */)
|
DECLARE_MULTICAST_DELEGATE_FourParams(FOLSAttributeChangedNativeDelegate, class UOLSHealthComponent* /* healthComponent */, float /* oldValue */, float /* newValue */, class AActor* /* instigator */)
|
||||||
|
|
||||||
|
DECLARE_LOG_CATEGORY_EXTERN(LogOLSHealthComponent, Verbose, All);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* EOLSDeathState
|
* EOLSDeathState
|
||||||
*
|
*
|
||||||
|
@ -26,6 +26,8 @@ public:
|
|||||||
FGameplayTag InputTag = FGameplayTag::EmptyTag;
|
FGameplayTag InputTag = FGameplayTag::EmptyTag;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
DECLARE_LOG_CATEGORY_EXTERN(LogOLSInputConfigDataAsset, Verbose, All);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* UOLSInputConfigDataAsset
|
* UOLSInputConfigDataAsset
|
||||||
*
|
*
|
||||||
|
@ -9,6 +9,8 @@
|
|||||||
#include "GameFramework/Actor.h"
|
#include "GameFramework/Actor.h"
|
||||||
#include "OLSModularActor.generated.h"
|
#include "OLSModularActor.generated.h"
|
||||||
|
|
||||||
|
DECLARE_LOG_CATEGORY_EXTERN(LogOLSModularActor, Verbose, All);
|
||||||
|
|
||||||
/** Minimal class that supports extension by game feature plugins, direct child of AActor */
|
/** Minimal class that supports extension by game feature plugins, direct child of AActor */
|
||||||
UCLASS(Blueprintable)
|
UCLASS(Blueprintable)
|
||||||
class OLS_API AOLSModularActor : public AActor, public IAbilitySystemInterface, public IGameplayTagAssetInterface
|
class OLS_API AOLSModularActor : public AActor, public IAbilitySystemInterface, public IGameplayTagAssetInterface
|
||||||
|
@ -9,6 +9,8 @@
|
|||||||
#include "GameFramework/Character.h"
|
#include "GameFramework/Character.h"
|
||||||
#include "OLSModularCharacter.generated.h"
|
#include "OLSModularCharacter.generated.h"
|
||||||
|
|
||||||
|
DECLARE_LOG_CATEGORY_EXTERN(LogOLSModularCharacter, Verbose, All);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Minimal class that supports extension by game feature plugins
|
* Minimal class that supports extension by game feature plugins
|
||||||
*
|
*
|
||||||
|
@ -9,6 +9,8 @@
|
|||||||
#include "GameFramework/DefaultPawn.h"
|
#include "GameFramework/DefaultPawn.h"
|
||||||
#include "OLSModularDefaultPawn.generated.h"
|
#include "OLSModularDefaultPawn.generated.h"
|
||||||
|
|
||||||
|
DECLARE_LOG_CATEGORY_EXTERN(LogOLSModularDefaultPawn, Verbose, All);
|
||||||
|
|
||||||
/** Minimal class that supports extension by game feature plugins, direct child of ADefaultPawn */
|
/** Minimal class that supports extension by game feature plugins, direct child of ADefaultPawn */
|
||||||
UCLASS(Blueprintable)
|
UCLASS(Blueprintable)
|
||||||
class OLS_API AOLSModularDefaultPawn : public ADefaultPawn, public IAbilitySystemInterface, public IGameplayTagAssetInterface
|
class OLS_API AOLSModularDefaultPawn : public ADefaultPawn, public IAbilitySystemInterface, public IGameplayTagAssetInterface
|
||||||
|
@ -9,6 +9,8 @@
|
|||||||
#include "GameFramework/Pawn.h"
|
#include "GameFramework/Pawn.h"
|
||||||
#include "OLSModularPawn.generated.h"
|
#include "OLSModularPawn.generated.h"
|
||||||
|
|
||||||
|
DECLARE_LOG_CATEGORY_EXTERN(LogOLSModularPawn, Verbose, All);
|
||||||
|
|
||||||
/** Minimal class that supports extension by game feature plugins, direct child of APawn */
|
/** Minimal class that supports extension by game feature plugins, direct child of APawn */
|
||||||
UCLASS(Blueprintable)
|
UCLASS(Blueprintable)
|
||||||
class OLS_API AOLSModularPawn : public APawn, public IAbilitySystemInterface, public IGameplayTagAssetInterface
|
class OLS_API AOLSModularPawn : public APawn, public IAbilitySystemInterface, public IGameplayTagAssetInterface
|
||||||
|
@ -8,6 +8,8 @@
|
|||||||
#include "GameFramework/PlayerState.h"
|
#include "GameFramework/PlayerState.h"
|
||||||
#include "OLSModularPlayerState.generated.h"
|
#include "OLSModularPlayerState.generated.h"
|
||||||
|
|
||||||
|
DECLARE_LOG_CATEGORY_EXTERN(LogOLSModularPlayerState, Verbose, All);
|
||||||
|
|
||||||
/** Minimal class that supports extension by game feature plugins */
|
/** Minimal class that supports extension by game feature plugins */
|
||||||
UCLASS(Blueprintable)
|
UCLASS(Blueprintable)
|
||||||
class OLS_API AOLSModularPlayerState : public APlayerState, public IAbilitySystemInterface
|
class OLS_API AOLSModularPlayerState : public APlayerState, public IAbilitySystemInterface
|
||||||
|
@ -9,6 +9,8 @@
|
|||||||
#include "GameFramework/Character.h"
|
#include "GameFramework/Character.h"
|
||||||
#include "OLSModularPlayerStateCharacter.generated.h"
|
#include "OLSModularPlayerStateCharacter.generated.h"
|
||||||
|
|
||||||
|
DECLARE_LOG_CATEGORY_EXTERN(LogOLSModularPlayerStateCharacter, Verbose, All);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Minimal class that supports extension by game feature plugins.
|
* Minimal class that supports extension by game feature plugins.
|
||||||
*
|
*
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
#include "Systems/OLSGameplayTagStack.h"
|
#include "Systems/OLSGameplayTagStack.h"
|
||||||
#include "OLSPlayerState.generated.h"
|
#include "OLSPlayerState.generated.h"
|
||||||
|
|
||||||
|
DECLARE_LOG_CATEGORY_EXTERN(LogOLSPlayerState, Verbose, All);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* AOLSPlayerState
|
* AOLSPlayerState
|
||||||
|
Loading…
Reference in New Issue
Block a user