tranek / GASDocumentation

My understanding of Unreal Engine 5's GameplayAbilitySystem plugin with a simple multiplayer sample project.
MIT License
4.52k stars 819 forks source link

Use correct activation info for ending jump #48

Closed KeyMaster- closed 3 years ago

KeyMaster- commented 3 years ago

An ability's CurrentSpecHandle, CurrentActorInfo and CurrentActivationInfo are not set when the abiilty is non-instanced. Passing them to EndAbility will make the call silently fail (because IsEndAbilityValid fails to get a pointer to the ASC from the ActorInfo), so the ability never ends. The callsite in the jump ability was likely never called so it didn't cause any issues, but it's better to be consistent in case someone uses it as reference.

tranek commented 3 years ago

Good catch. That ability is almost an exact copy and paste from UGameplayAbility_CharacterJump which comes with the plugin. However, Epic just returned there instead of calling EndAbility(). I assumed the return would never actually end the ability so I added the EndAbility() call.