mirror of
https://github.com/Ed94/Cog.git
synced 2026-07-30 19:30:05 +00:00
CogDebug: improving transform gizmos and collision tester (WIP)
This commit is contained in:
@@ -154,7 +154,7 @@ void UCogSampleAreaComponent::TickComponent(float DeltaTime, enum ELevelTick Tic
|
||||
#if ENABLE_COG
|
||||
|
||||
const AActor* AreaInstigator = UCogSampleFunctionLibrary_Gameplay::GetInstigator(GetOwner());
|
||||
if (FCogDebugLog::IsLogCategoryActive(LogCogArea) && FCogDebugSettings::IsDebugActiveForObject(AreaInstigator))
|
||||
if (FCogDebugLog::IsLogCategoryActive(LogCogArea) && FCogDebug::IsDebugActiveForObject(AreaInstigator))
|
||||
{
|
||||
TArray<USceneComponent*, TInlineAllocator<8>> Components;
|
||||
GetOwner()->GetComponents<USceneComponent>(Components);
|
||||
|
||||
@@ -677,7 +677,7 @@ void ACogSampleCharacter::OnGhostTagNewOrRemoved(const FGameplayTag InTag, int32
|
||||
void ACogSampleCharacter::OnScaleAttributeChanged(const FOnAttributeChangeData& Data)
|
||||
{
|
||||
//----------------------------------------------------------------------------------
|
||||
// 'Data.NewValue' is not used because it seems to only corresponds to the changes
|
||||
// 'Settings.NewValue' is not used because it seems to only corresponds to the changes
|
||||
// of the BaseValue which do not account for the temporary modifiers.
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -224,7 +224,7 @@ void UCogSampleCharacterMovementComponent::TickComponent(float DeltaTime, enum E
|
||||
const ACharacter* Character = GetCharacterOwner();
|
||||
const UCapsuleComponent* CapsuleComponent = Character->GetCapsuleComponent();
|
||||
|
||||
if (FCogDebugSettings::IsDebugActiveForObject(GetPawnOwner()))
|
||||
if (FCogDebug::IsDebugActiveForObject(GetPawnOwner()))
|
||||
{
|
||||
FCogDebugPlot::PlotValue(GetPawnOwner(), "Move Input X", GetPendingInputVector().X);
|
||||
FCogDebugPlot::PlotValue(GetPawnOwner(), "Move Input Y", GetPendingInputVector().Y);
|
||||
@@ -241,7 +241,7 @@ void UCogSampleCharacterMovementComponent::TickComponent(float DeltaTime, enum E
|
||||
const FVector DebugLocation = Character->GetActorLocation();
|
||||
const FVector DebugBottomLocation = DebugLocation - FVector::UpVector * CapsuleComponent->GetScaledCapsuleHalfHeight();
|
||||
|
||||
if (FCogDebugSettings::IsDebugActiveForObject(GetPawnOwner()))
|
||||
if (FCogDebug::IsDebugActiveForObject(GetPawnOwner()))
|
||||
{
|
||||
const FRotator Rotation = Character->GetActorRotation();
|
||||
const FVector Forward = Character->GetActorForwardVector();
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
|
||||
#if ENABLE_COG
|
||||
|
||||
#include "CogDebugSettings.h"
|
||||
#include "CogDebug.h"
|
||||
|
||||
#define COG_LOG_ABILITY(Verbosity, Ability, Format, ...) \
|
||||
if (Ability != nullptr) \
|
||||
{ \
|
||||
AActor* Actor = Ability->GetAvatarActorFromActorInfo(); \
|
||||
if (FCogDebugSettings::IsDebugActiveForObject(Actor) || (int32)Verbosity <= (int32)ELogVerbosity::Warning) \
|
||||
if (FCogDebug::IsDebugActiveForObject(Actor) || (int32)Verbosity <= (int32)ELogVerbosity::Warning) \
|
||||
{ \
|
||||
COG_LOG(LogCogAbility, Verbosity, TEXT("%s - %s - %s - %s"), \
|
||||
*GetNameSafe(Actor), \
|
||||
|
||||
@@ -197,7 +197,7 @@ bool UCogSampleGameplayAbility::IsCostGameplayEffectIsZero(const UGameplayEffect
|
||||
const float CostValue = ModSpec.GetEvaluatedMagnitude();
|
||||
|
||||
//----------------------------------------------------------------------------------------------
|
||||
// The Cost in the Data is positive, but UCogSampleModifierCalculation_Cost negates it.
|
||||
// The Cost in the Settings is positive, but UCogSampleModifierCalculation_Cost negates it.
|
||||
// Therefore a cost less than zero is an actual cost, and a cost of 0 or greater can be ignored
|
||||
//----------------------------------------------------------------------------------------------
|
||||
if (CostValue < 0)
|
||||
|
||||
Reference in New Issue
Block a user