reznok / GMCAbilitySystem

An Unreal Engine plugin that adds an ability system to the General Movement Component plugin
MIT License
27 stars 12 forks source link

Bug (dev branch) : AbilityData.InputTag is always empty in AncillaryTick, preventing AncillaryTick Ability to work. #65

Closed Aherys closed 1 month ago

Aherys commented 2 months ago

In commit : https://github.com/reznok/GMCAbilitySystem/commit/c183164495dfa8e3b06470d654a8bcd9d4568283

GMCAbilityComponent.cpp:172

    if (AbilityData.InputTag != FGameplayTag::EmptyTag)
    {
        TryActivateAbilitiesByInputTag(AbilityData.InputTag, AbilityData.ActionInput, false);
    }

but AbilityData is cleaned by

GMCAbilityComponent.cpp:500

AbilityData = FGMCAbilityData{};

Meaning that AbilityData will always be empty, no matter what happen. I'm afraid if we move the clean of FGMCAbilityData AbilityData, we will break replay move for abilities.

Suggestion : Duplicate FGMCAbilityData, in another struct on the pop time, so AncillaryTick has his own copy of the current AbilityTask, and he can clean it himself.

Aherys commented 2 months ago

So, the idea for the pop wasn't good. However, simply copy the FGMCAbilityData into GenPred before the reset, to another struct specially for AncilarityTick work well.

https://github.com/Aherys/DeepWorlds_GMCAbilitySystem/commit/db66d8d88b8adb6580ebb06c1c5db4b0aca7a0a3

Aherys commented 2 months ago

Set in PR #66 for dev branch.

petegilb commented 1 month ago

72 fixed in this