Skip to content

Conversation

@reznok
Copy link
Owner

@reznok reznok commented Aug 11, 2025

Note

Refactors networking to new BoundQueueV2 with cached client/server operations and acks, switches effect replication to IDs, updates debugger, and enables Niagara.

  • Networking/Queues (major refactor):
    • Replace legacy GMASBoundQueue with new FGMASBoundQueueV2 pipeline bound via GMC (OperationData, caching, client/server queues, grace-period force, acks).
    • Add operation types in GMASBoundQueueV2_Operations (ability activation, acknowledge, apply/remove effect, add impulse, set actor location, custom event).
    • Implement server/client processing paths: ProcessOperation, ServerProcessOperation, ServerProcessAcknowledgedOperation, payload caching/expiration, and ancillary/prediction integration.
  • Effects replication:
    • Switch from replicating ActiveEffectsData to ActiveEffectIDs with OnRep_ActiveEffectIDs; update cleanup and ID reservation/validation.
    • Rework effect apply/remove paths to use server-auth operations; simplify predicted apply path.
  • Abilities:
    • TryActivateAbilitiesByInputTag now returns bool and supports bForce; QueueAbility queues FGMASBoundQueueV2AbilityActivationOperation.
  • Debugger:
    • Update displays/counts to use ActiveEffectIDs and show cached operation payload count.
  • Perf/telemetry:
    • Add CPU trace scopes to core ticks; add ancillary/pre-move hooks to V2 queue.
  • Misc:
    • Add RPC RPCOnServerOperationAdded; handler OnServerOperationForced.
    • Enable Niagara plugin in .uplugin.
    • Remove legacy GMASBoundQueue files/usages.

Written by Cursor Bugbot for commit 58e9d6b. This will update automatically on new commits. Configure here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bugbot free trial expires on August 25, 2025
Learn more in the Cursor dashboard.

}

return true;
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Function Uses Incorrect Variable for Validation

The IsValidGMASOperation function incorrectly uses the member variable OperationData for its validation checks (e.g., IsValid() and GetPtr<>()) instead of the Data parameter. This leads to improper validation of input operations.

Fix in Cursor Fix in Web

// Show client-side data
if (AbilityComponent)
{
if (DataPack.NBActiveEffectData != AbilityComponent->ActiveEffectIDs.Num())
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Incorrect Cached Operations Incoherency Check

The Gameplay Debugger's "Cached Operations" display incorrectly checks for data incoherency. It compares DataPack.NBActiveEffectData with AbilityComponent->ActiveEffectIDs.Num() instead of DataPack.NBCachedOperationPayloads with AbilityComponent->BoundQueueV2.OperationPayloads.Num(). This leads to inaccurate incoherency detection for cached operations.

Fix in Cursor Fix in Web

UE_LOG(LogGMCAbilitySystem, Error, TEXT("No Abilities Granted for InputTag: %s"), *InputTag.ToString());
return false;
}
bool bFirstAbilityActivatesDuringMovementTick = GrantedAbilities[0]->GetDefaultObject<UGMCAbility>()->bActivateOnMovementTick;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Null Pointer in Ability Activation

Null pointer dereference in UGMC_AbilitySystemComponent::TryActivateAbilitiesByInputTag. The code accesses GrantedAbilities[0] and calls GetDefaultObject() without validating that GrantedAbilities[0] is a valid class pointer. Although the array's size is checked, individual elements are not, which can lead to a crash if GetGrantedAbilitiesByTag returns null class pointers.

Fix in Cursor Fix in Web

{
return QueuedAbilityOperations.NumMatching(AbilityTag, EGMASBoundQueueOperationType::Activate);
return 0;
// return QueuedAbilityOperations.NumMatching(AbilityTag, EGMASBoundQueueOperationType::Activate);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Queued Abilities Count Always Zero

The GetQueuedAbilityCount function was stubbed out to always return 0, preventing accurate retrieval of the number of queued abilities and breaking any dependent ability activation or queueing logic.

Fix in Cursor Fix in Web

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is being reviewed by Cursor Bugbot

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

}
else
{
BoundQueueV2.QueueServerOperation(OperationID);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: bPreventConcurrentActivation parameter is completely ignored

The QueueAbility function accepts a bPreventConcurrentActivation parameter but never uses it. The old implementation had logic to prevent concurrent activation of abilities, but this was removed during the refactor without being reimplemented, allowing duplicate ability activations that were previously blocked.

Fix in Cursor Fix in Web

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.

2 participants