AbilityTask_WaitTargetData wipes client targeting data

To reproduce this create a Multiplayer test app with a local predicted ability using wait target data. I am using the built in single line trace targeting actor but it happens with others as well. When you target an actor on server it works fine. When you target an actor on client and client finds the actor but server does not.

Tracing through the code you can see that the targeting info does arrive at server by setting a breakpoint in AbilityTask_WaitTargetData on line 210. If you inspect the passed in Data and you will see valid hit result info.

However once the call to ConsumeClientReplicatedTargetData is made on line 212 the passed in data is set to Empty. This breaks the functionality following this line and results in client and server getting out of sync results.

FYI This was working fine in 4.11. I see from my diff that there were significant changes to the Gameplay ability section. That is great that it is finally getting some love, but need to do some multiplayer testing of the updates.

Thanks

I suspect that AbilityTask_WaitTargetData line 223:
FGameplayAbilityTargetDataHandle MutableData = Data;

should be moved to a point above the call to ConsumeClientReplicatedTargetData

but I cannot test this as I am not setup for a source build.

Update - I have cloned AbilityTask_WaitTargetData to my local project and tested the change I described above. This does seem to resolve the issue. Having a local working version is good enough for me, but you probably want to fix this in the source. Thanks!

Hey antsonthetree-

Thanks for pointing this out for us. Since you have found a working solution to this issue, I would suggest entering a pull request (https://github.com/EpicGames/UnrealEngine/compare?expand=1) that will be reviewed and, if accepted, added directly to the engine along with you being named an engine contributor.

Cheers