fix: Server-owned pawns ability activation dropping silently.#10
fix: Server-owned pawns ability activation dropping silently.#10Crezetique wants to merge 2 commits into
Conversation
When a server-owned pawn attempts to activate an ability that has `bRunOnMovementTick == false`, it is being silently dropped. The queue payload is currently being consumed regardless of whether `TryActivateAbilitiesByInputTag()` succeeds. The operation should be processed twice, first on MovementTick which fails the operation and removes the operation before it is able to correctly activate.
WalkthroughModified ability activation payload handling in ChangesAbility Activation Payload Consumption
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
- Added comment and updated bool naming to be clearer on purpose.
Summary
When a server-owned pawn attempts to activate an ability that has
bRunOnMovementTick == false, it is being silently dropped. The queue payload is currently being consumed regardless of whetherTryActivateAbilitiesByInputTag()succeeds.Fix
Updated the payload to only be removed if
TryActivateAbilitiesByInputTag()returns true.Tested this fix without the experimental fix 8c91d5e by @Aherys:
From my testing, we can't remove the payload just from bActivated as this would cause clients ability activation to throw Operation ID mismatch errors. From my understanding, this is due to how client fire its ability differently from server.
Note that the payload is always being processed twice.
The first instance always fails as the instance is running on MovementTick and being dropped by this guard:
Test Scenarios
✅ Server-Owned Pawn Ability Activation - bRunOnMovementTick == true
✅ Server-Owned Pawn Ability Activation - bRunOnMovementTick == false
✅ Client-Owned Pawn Ability Activation - bRunOnMovementTick == true
✅ Client-Owned Pawn Ability Activation - bRunOnMovementTick == false
Summary by CodeRabbit