diff --git a/Content/Characters/(Shared)/Effects/GE_Regen.uasset b/Content/Characters/(Shared)/Effects/GE_Regen.uasset index b24e0e8..a5cfd6a 100644 Binary files a/Content/Characters/(Shared)/Effects/GE_Regen.uasset and b/Content/Characters/(Shared)/Effects/GE_Regen.uasset differ diff --git a/Content/Characters/(Shared)/GE_Creature_Attributes.uasset b/Content/Characters/(Shared)/GE_Creature_Attributes.uasset new file mode 100644 index 0000000..657d7e0 Binary files /dev/null and b/Content/Characters/(Shared)/GE_Creature_Attributes.uasset differ diff --git a/Content/Characters/Creature1/Attributes/GE_Creature1_Attributes.uasset b/Content/Characters/Creature1/Attributes/GE_Creature1_Attributes.uasset index df91958..8b1d465 100644 Binary files a/Content/Characters/Creature1/Attributes/GE_Creature1_Attributes.uasset and b/Content/Characters/Creature1/Attributes/GE_Creature1_Attributes.uasset differ diff --git a/Content/Characters/Creature1/BP_Creature1.uasset b/Content/Characters/Creature1/BP_Creature1.uasset index 69c1662..b4c38e7 100644 Binary files a/Content/Characters/Creature1/BP_Creature1.uasset and b/Content/Characters/Creature1/BP_Creature1.uasset differ diff --git a/Content/Characters/Creature2/Attributes/GE_Creature2_Attributes.uasset b/Content/Characters/Creature2/Attributes/GE_Creature2_Attributes.uasset index fed6e8f..d3f9384 100644 Binary files a/Content/Characters/Creature2/Attributes/GE_Creature2_Attributes.uasset and b/Content/Characters/Creature2/Attributes/GE_Creature2_Attributes.uasset differ diff --git a/Content/Characters/Creature2/BP_Creature2.uasset b/Content/Characters/Creature2/BP_Creature2.uasset index 6d5fa68..d6c0f89 100644 Binary files a/Content/Characters/Creature2/BP_Creature2.uasset and b/Content/Characters/Creature2/BP_Creature2.uasset differ diff --git a/Content/Characters/Hero1/Abilities/Blast/AM_Hero1_Blast.uasset b/Content/Characters/Hero1/Abilities/Blast/AM_Hero1_Blast.uasset index ed7e432..7afb405 100644 Binary files a/Content/Characters/Hero1/Abilities/Blast/AM_Hero1_Blast.uasset and b/Content/Characters/Hero1/Abilities/Blast/AM_Hero1_Blast.uasset differ diff --git a/Content/Characters/Hero1/Abilities/Shield/AM_Hero1_Shield.uasset b/Content/Characters/Hero1/Abilities/Shield/AM_Hero1_Shield.uasset index f99b7e2..b193287 100644 Binary files a/Content/Characters/Hero1/Abilities/Shield/AM_Hero1_Shield.uasset and b/Content/Characters/Hero1/Abilities/Shield/AM_Hero1_Shield.uasset differ diff --git a/Content/Characters/Hero1/Attributes/GE_Hero1_Attributes.uasset b/Content/Characters/Hero1/Attributes/GE_Hero1_Attributes.uasset index d0edd8f..50b377f 100644 Binary files a/Content/Characters/Hero1/Attributes/GE_Hero1_Attributes.uasset and b/Content/Characters/Hero1/Attributes/GE_Hero1_Attributes.uasset differ diff --git a/Content/Characters/Hero1/BP_Hero1.uasset b/Content/Characters/Hero1/BP_Hero1.uasset index 7cc88b9..74c7cbc 100644 Binary files a/Content/Characters/Hero1/BP_Hero1.uasset and b/Content/Characters/Hero1/BP_Hero1.uasset differ diff --git a/Content/Characters/Hero2/Attributes/GE_Hero2_Attributes.uasset b/Content/Characters/Hero2/Attributes/GE_Hero2_Attributes.uasset index ad8f734..d036bf2 100644 Binary files a/Content/Characters/Hero2/Attributes/GE_Hero2_Attributes.uasset and b/Content/Characters/Hero2/Attributes/GE_Hero2_Attributes.uasset differ diff --git a/Content/Characters/Hero2/BP_Hero2.uasset b/Content/Characters/Hero2/BP_Hero2.uasset index 9b02050..70f3e0b 100644 Binary files a/Content/Characters/Hero2/BP_Hero2.uasset and b/Content/Characters/Hero2/BP_Hero2.uasset differ diff --git a/Content/Core/Debug/DA_Debug_Ability.uasset b/Content/Core/Debug/DA_Debug_Ability.uasset index a710f50..eaac0ea 100644 Binary files a/Content/Core/Debug/DA_Debug_Ability.uasset and b/Content/Core/Debug/DA_Debug_Ability.uasset differ diff --git a/Content/Core/Debug/Tweaks/GE_Tweak_BaseDamage.uasset b/Content/Core/Debug/Tweaks/GE_Tweak_BaseDamage.uasset new file mode 100644 index 0000000..3c85c44 Binary files /dev/null and b/Content/Core/Debug/Tweaks/GE_Tweak_BaseDamage.uasset differ diff --git a/Content/__ExternalActors__/Maps/L_Default/2/KZ/3Y4PAKEW3L97J087BUDMVI.uasset b/Content/__ExternalActors__/Maps/L_Default/2/KZ/3Y4PAKEW3L97J087BUDMVI.uasset index 2528edf..581be9e 100644 Binary files a/Content/__ExternalActors__/Maps/L_Default/2/KZ/3Y4PAKEW3L97J087BUDMVI.uasset and b/Content/__ExternalActors__/Maps/L_Default/2/KZ/3Y4PAKEW3L97J087BUDMVI.uasset differ diff --git a/Content/__ExternalActors__/Maps/L_Default/5/88/NDHUEK1ROBM2RCW7ZU51MM.uasset b/Content/__ExternalActors__/Maps/L_Default/5/88/NDHUEK1ROBM2RCW7ZU51MM.uasset index be2d809..f2a3c2b 100644 Binary files a/Content/__ExternalActors__/Maps/L_Default/5/88/NDHUEK1ROBM2RCW7ZU51MM.uasset and b/Content/__ExternalActors__/Maps/L_Default/5/88/NDHUEK1ROBM2RCW7ZU51MM.uasset differ diff --git a/Content/__ExternalActors__/Maps/L_Default/6/U3/6O7DJ03I0JB041XHH0L21L.uasset b/Content/__ExternalActors__/Maps/L_Default/6/U3/6O7DJ03I0JB041XHH0L21L.uasset index b2a320d..c43bb65 100644 Binary files a/Content/__ExternalActors__/Maps/L_Default/6/U3/6O7DJ03I0JB041XHH0L21L.uasset and b/Content/__ExternalActors__/Maps/L_Default/6/U3/6O7DJ03I0JB041XHH0L21L.uasset differ diff --git a/Plugins/CogAbility/Source/CogAbility/Private/CogAbilityWindow_Abilities.cpp b/Plugins/CogAbility/Source/CogAbility/Private/CogAbilityWindow_Abilities.cpp index 251ebf5..cb07f48 100644 --- a/Plugins/CogAbility/Source/CogAbility/Private/CogAbilityWindow_Abilities.cpp +++ b/Plugins/CogAbility/Source/CogAbility/Private/CogAbilityWindow_Abilities.cpp @@ -252,6 +252,13 @@ void UCogAbilityWindow_Abilities::RenderAbilitiesTable(UAbilitySystemComponent& //-------------------------------------------------------------------------------------------------------------------------- void UCogAbilityWindow_Abilities::RenderAbilityCooldown(const UAbilitySystemComponent& AbilitySystemComponent, UGameplayAbility& Ability) { + FGameplayAbilitySpec* Spec = Ability.GetCurrentAbilitySpec(); + + if (Spec == nullptr) + { + return; + } + float RemainingTime, CooldownDuration; Ability.GetCooldownTimeRemainingAndDuration(Ability.GetCurrentAbilitySpec()->Handle, AbilitySystemComponent.AbilityActorInfo.Get(), RemainingTime, CooldownDuration); diff --git a/Plugins/CogAbility/Source/CogAbility/Private/CogAbilityWindow_Cheats.cpp b/Plugins/CogAbility/Source/CogAbility/Private/CogAbilityWindow_Cheats.cpp index b348791..1d1335d 100644 --- a/Plugins/CogAbility/Source/CogAbility/Private/CogAbilityWindow_Cheats.cpp +++ b/Plugins/CogAbility/Source/CogAbility/Private/CogAbilityWindow_Cheats.cpp @@ -268,7 +268,7 @@ void UCogAbilityWindow_Cheats::RequestCheat(AActor* ControlledActor, AActor* Sel if (ICogCommonAllegianceActorInterface* AllegianceInterface = Cast(OtherActor)) { - AllegianceInterface->GetAllegianceWithOtherActor(ControlledActor); + Allegiance = AllegianceInterface->GetAllegianceWithOtherActor(ControlledActor); } if ((IsShiftDown && (Allegiance == ECogCommonAllegiance::Enemy)) diff --git a/Plugins/CogDebug/Source/CogDebug/Private/CogDebugMetric.cpp b/Plugins/CogDebug/Source/CogDebug/Private/CogDebugMetric.cpp index b1dbd11..03c5ec6 100644 --- a/Plugins/CogDebug/Source/CogDebug/Private/CogDebugMetric.cpp +++ b/Plugins/CogDebug/Source/CogDebug/Private/CogDebugMetric.cpp @@ -83,8 +83,6 @@ void FCogDebugMetricValue::UpdateMetricPerSecond(const float Duration) PerSecond = Duration > 1.0f ? Total / Duration : Total; } -//-------------------------------------------------------------------------------------------------------------------------- -// //-------------------------------------------------------------------------------------------------------------------------- void FCogDebugMetricEntry::Reset() { diff --git a/Plugins/CogEngine/Source/CogEngine/Private/CogEngineWindow_Metrics.cpp b/Plugins/CogEngine/Source/CogEngine/Private/CogEngineWindow_Metrics.cpp index 5248c61..5d7b8d7 100644 --- a/Plugins/CogEngine/Source/CogEngine/Private/CogEngineWindow_Metrics.cpp +++ b/Plugins/CogEngine/Source/CogEngine/Private/CogEngineWindow_Metrics.cpp @@ -2,6 +2,7 @@ #include "CogDebugMetric.h" #include "CogImguiHelper.h" +#include "CogWindowWidgets.h" #include "imgui.h" //-------------------------------------------------------------------------------------------------------------------------- @@ -81,29 +82,32 @@ void UCogEngineWindow_Metrics::RenderContent() ImGui::EndMenuBar(); } + if (GetWorld()->GetNetMode() == ENetMode::NM_Client) + { + ImGui::Text("Currently not available on client"); + return; + } + if (FCogDebugMetric::Metrics.IsEmpty()) { - ImGui::BeginDisabled(); ImGui::Text("No metric received yet"); - ImGui::EndDisabled(); + return; } - else + + int32 Index = 0; + for (auto& Entry : FCogDebugMetric::Metrics) { - int32 Index = 0; - for (auto& Entry : FCogDebugMetric::Metrics) + FName MetricName = Entry.Key; + FCogDebugMetricEntry& Metric = Entry.Value; + + if (ImGui::CollapsingHeader(TCHAR_TO_ANSI(*MetricName.ToString()), ImGuiTreeNodeFlags_DefaultOpen)) { - FName MetricName = Entry.Key; - FCogDebugMetricEntry& Metric = Entry.Value; - - if (ImGui::CollapsingHeader(TCHAR_TO_ANSI(*MetricName.ToString()), ImGuiTreeNodeFlags_DefaultOpen)) - { - ImGui::PushID(Index); - DrawMetric(Metric); - ImGui::PopID(); - } - - Index++; + ImGui::PushID(Index); + DrawMetric(Metric); + ImGui::PopID(); } + + Index++; } } diff --git a/Plugins/CogInput/Source/CogInput/Private/CogInputWindow_Gamepad.cpp b/Plugins/CogInput/Source/CogInput/Private/CogInputWindow_Gamepad.cpp index 4cd445f..f7c9718 100644 --- a/Plugins/CogInput/Source/CogInput/Private/CogInputWindow_Gamepad.cpp +++ b/Plugins/CogInput/Source/CogInput/Private/CogInputWindow_Gamepad.cpp @@ -293,6 +293,10 @@ void UCogInputWindow_Gamepad::RenderContent() ImGui::Dummy(bShowAsOverlay ? CanvasMax - CanvasMin : ContentSize); if (ImGui::BeginPopupContextItem()) { + if (ImGui::Button("Close", ImVec2(-1.0f, 0))) + { + SetIsVisible(false); + } ImGui::Checkbox("Overlay", &bShowAsOverlay); ImGui::Separator(); ImGui::Checkbox("Invert Left Stick Y", &bInvertLeftStickY); diff --git a/Plugins/CogInput/Source/CogInput/Public/CogInputWindow_Actions.h b/Plugins/CogInput/Source/CogInput/Public/CogInputWindow_Actions.h index 6b90181..d3ae033 100644 --- a/Plugins/CogInput/Source/CogInput/Public/CogInputWindow_Actions.h +++ b/Plugins/CogInput/Source/CogInput/Public/CogInputWindow_Actions.h @@ -36,7 +36,6 @@ private: UPROPERTY(Config) float RepeatPeriod = 0.5f; - UPROPERTY(Config) float RepeatTime = 0.0f; UPROPERTY() diff --git a/Plugins/CogInput/Source/CogInput/Public/CogInputWindow_Gamepad.h b/Plugins/CogInput/Source/CogInput/Public/CogInputWindow_Gamepad.h index ae58757..bc83b31 100644 --- a/Plugins/CogInput/Source/CogInput/Public/CogInputWindow_Gamepad.h +++ b/Plugins/CogInput/Source/CogInput/Public/CogInputWindow_Gamepad.h @@ -69,6 +69,9 @@ private: UPROPERTY(Config) float Border = 0.02f; + UPROPERTY(Config) + float RepeatPeriod = 0.5f; + UPROPERTY() TWeakObjectPtr Asset; @@ -78,8 +81,6 @@ private: ImDrawList* DrawList = nullptr; - float RepeatPeriod = 0.5f; - float RepeatTime = 0.0f; ImVec2 CanvasMin; diff --git a/Plugins/CogWindow/Source/CogWindow/Public/CogWindow.h b/Plugins/CogWindow/Source/CogWindow/Public/CogWindow.h index c50f4ff..6f14810 100644 --- a/Plugins/CogWindow/Source/CogWindow/Public/CogWindow.h +++ b/Plugins/CogWindow/Source/CogWindow/Public/CogWindow.h @@ -78,11 +78,11 @@ protected: ULocalPlayer* GetLocalPlayer(); +protected: + UPROPERTY(Config) bool bHasMenu = false; -private: - bool bIsVisible = false; bool bShowInsideMenu = true; diff --git a/Source/CogSample/CogSampleCharacter.cpp b/Source/CogSample/CogSampleCharacter.cpp index ecf8c26..5a18385 100644 --- a/Source/CogSample/CogSampleCharacter.cpp +++ b/Source/CogSample/CogSampleCharacter.cpp @@ -80,6 +80,9 @@ void ACogSampleCharacter::GetLifetimeReplicatedProps(TArray< FLifetimeProperty > DOREPLIFETIME_WITH_PARAMS_FAST(ACogSampleCharacter, ActiveAbilityHandles, Params); DOREPLIFETIME_WITH_PARAMS_FAST(ACogSampleCharacter, Team, Params); + + Params.Condition = COND_None; + DOREPLIFETIME_WITH_PARAMS_FAST(ACogSampleCharacter, Scale, Params); } @@ -117,7 +120,8 @@ void ACogSampleCharacter::EndPlay(const EEndPlayReason::Type EndPlayReason) void ACogSampleCharacter::MarkComponentsAsPendingKill() { Super::MarkComponentsAsPendingKill(); - ShutdownAbilitySystem(); + + UnregisterFromAbilitySystemEvents(); } //-------------------------------------------------------------------------------------------------------------------------- @@ -262,6 +266,16 @@ void ACogSampleCharacter::InitializeAbilitySystem() MARK_PROPERTY_DIRTY_FROM_NAME(ACogSampleCharacter, ActiveAbilityHandles, this); } + bIsAbilitySystemInitialized = true; + + AbilitySystem->AddLooseGameplayTags(InitialTags); + + TryFinishInitialize(); +} + +//-------------------------------------------------------------------------------------------------------------------------- +void ACogSampleCharacter::RegisterToAbilitySystemEvents() +{ //---------------------------------------- // Register to Tag change events //---------------------------------------- @@ -280,32 +294,10 @@ void ACogSampleCharacter::InitializeAbilitySystem() //---------------------------------------- GameplayEffectAddedHandle = AbilitySystem->OnActiveGameplayEffectAddedDelegateToSelf.AddUObject(this, &ACogSampleCharacter::OnGameplayEffectAdded); GameplayEffectRemovedHandle = AbilitySystem->OnAnyGameplayEffectRemovedDelegate().AddUObject(this, &ACogSampleCharacter::OnGameplayEffectRemoved); - - bIsAbilitySystemInitialized = true; - - TryFinishInitialize(); } //-------------------------------------------------------------------------------------------------------------------------- -void ACogSampleCharacter::TryFinishInitialize() -{ - if (bIsInitialized) - { - return; - } - - if (HasActorBegunPlay() == false) - { - return; - } - - bIsInitialized = true; - - OnInitialized.Broadcast(this); -} - -//-------------------------------------------------------------------------------------------------------------------------- -void ACogSampleCharacter::ShutdownAbilitySystem() +void ACogSampleCharacter::UnregisterFromAbilitySystemEvents() { //---------------------------------------- // Unregister to Attribute events @@ -325,11 +317,29 @@ void ACogSampleCharacter::ShutdownAbilitySystem() //---------------------------------------- AbilitySystem->OnActiveGameplayEffectAddedDelegateToSelf.Remove(GameplayEffectAddedHandle); AbilitySystem->OnAnyGameplayEffectRemovedDelegate().Remove(GameplayEffectRemovedHandle); - - - AbilitySystem->ClearActorInfo(); } +//-------------------------------------------------------------------------------------------------------------------------- +void ACogSampleCharacter::TryFinishInitialize() +{ + if (bIsInitialized) + { + return; + } + + if (HasActorBegunPlay() == false) + { + return; + } + + RegisterToAbilitySystemEvents(); + + bIsInitialized = true; + + OnInitialized.Broadcast(this); +} + + //-------------------------------------------------------------------------------------------------------------------------- void ACogSampleCharacter::SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) { @@ -615,7 +625,15 @@ void ACogSampleCharacter::OnGhostTagNewOrRemoved(const FGameplayTag InTag, int32 //-------------------------------------------------------------------------------------------------------------------------- void ACogSampleCharacter::OnScaleAttributeChanged(const FOnAttributeChangeData& Data) { - SetActorScale3D(FVector(Data.NewValue)); + Scale = Data.NewValue; + MARK_PROPERTY_DIRTY_FROM_NAME(ACogSampleCharacter, Scale, this); + OnRep_Scale(); +} + +//-------------------------------------------------------------------------------------------------------------------------- +void ACogSampleCharacter::OnRep_Scale() +{ + SetActorScale3D(FVector(Scale)); } //-------------------------------------------------------------------------------------------------------------------------- diff --git a/Source/CogSample/CogSampleCharacter.h b/Source/CogSample/CogSampleCharacter.h index 169cdf3..5eb14f0 100644 --- a/Source/CogSample/CogSampleCharacter.h +++ b/Source/CogSample/CogSampleCharacter.h @@ -205,6 +205,9 @@ public: UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Ability) TArray> Effects; + UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Ability) + FGameplayTagContainer InitialTags; + UPROPERTY(BlueprintAssignable) FCogSampleCharacterEventDelegate OnInitialized; @@ -261,7 +264,9 @@ private: void InitializeAbilitySystem(); - void ShutdownAbilitySystem(); + void RegisterToAbilitySystemEvents(); + + void UnregisterFromAbilitySystemEvents(); void OnGameplayEffectAdded(UAbilitySystemComponent* AbilitySystemComponent, const FGameplayEffectSpec& GameplayEffectSpec, FActiveGameplayEffectHandle Handle); @@ -275,12 +280,18 @@ private: void UpdateActiveAbilitySlots(); + UFUNCTION() + void OnRep_Scale(); + UFUNCTION() void OnRep_ActiveAbilityHandles(); UPROPERTY(ReplicatedUsing=OnRep_ActiveAbilityHandles, Transient) TArray ActiveAbilityHandles; + UPROPERTY(ReplicatedUsing = OnRep_Scale, Transient) + float Scale = 1.0f; + FDelegateHandle GameplayEffectAddedHandle; FDelegateHandle GameplayEffectRemovedHandle;