Skip to content

fix: Server-owned pawns ability activation dropping silently.#10

Open
Crezetique wants to merge 2 commits into
DeepWorldsSA:devfrom
Crezetique:fix/server-owned-ability-activation
Open

fix: Server-owned pawns ability activation dropping silently.#10
Crezetique wants to merge 2 commits into
DeepWorldsSA:devfrom
Crezetique:fix/server-owned-ability-activation

Conversation

@Crezetique
Copy link
Copy Markdown

@Crezetique Crezetique commented May 21, 2026

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 whether TryActivateAbilitiesByInputTag() succeeds.

Fix

Updated the payload to only be removed if TryActivateAbilitiesByInputTag() returns true.

Tested this fix without the experimental fix 8c91d5e by @Aherys:

  • Linked fix is still required for server-owned ability activation to fire correctly.
  • Without the fix, the ability would fail, then succeed exactly one second after failure.

bPreserveForAncillaryTick = !bActivated && bFromMovementTick

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.

[2026.05.21-21.41.21:610][922]LogGMCAbilitySystem: Warning: Ability Activation: false
[2026.05.21-21.41.21:610][922]LogGMCAbilitySystem: Warning: Ability Activation: true

The first instance always fails as the instance is running on MovementTick and being dropped by this guard:

	if (!bForce && bFirstAbilityActivatesDuringMovementTick != bFromMovementTick)
	{
		// If the first ability doesn't match the bFromMovementTick state, we can't activate any abilities
		return false;
	}

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

  • Bug Fixes
    • Improved server-side ability activation handling to ensure proper operation payload management, enhancing the reliability of ability activations.

Review Change Stack

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.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 21, 2026

Walkthrough

Modified ability activation payload handling in ProcessOperation so server-side cache removal is conditional on successful ability activation. Payload is now removed only after TryActivateAbilitiesByInputTag succeeds on the authority, preventing stale cached entries if activation fails.

Changes

Ability Activation Payload Consumption

Layer / File(s) Summary
Conditional payload removal on successful activation
Source/GMCAbilitySystem/Private/Components/GMCAbilityComponent.cpp
Server-side handling of FGMASBoundQueueV2AbilityActivationOperation now captures the ability activation result in bSuccess and conditionally removes the operation payload from BoundQueueV2 only when HasAuthority() and activation succeeded, returning the actual success state.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A queue that once consumed too soon,
Now waits for success before it goes.
Payload flows with better timing—
Only freed when activation glows!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The PR title accurately summarizes the main fix: preventing silent dropping of ability activation for server-owned pawns by only consuming the queue payload on successful activation.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Crezetique Crezetique changed the title Fixed server-owned pawns ability activation dropping silently. fix: Server-owned pawns ability activation dropping silently. May 21, 2026
- Added comment and updated bool naming to be clearer on purpose.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant