Skip to content

fix(component): move AddImpulse + SetActorLocation declarations to public#9

Open
reznok wants to merge 1 commit into
DeepWorldsSA:devfrom
reznok:fix/synced-event-public-visibility
Open

fix(component): move AddImpulse + SetActorLocation declarations to public#9
reznok wants to merge 1 commit into
DeepWorldsSA:devfrom
reznok:fix/synced-event-public-visibility

Conversation

@reznok
Copy link
Copy Markdown

@reznok reznok commented May 18, 2026

Summary

Move two UFUNCTION(BlueprintCallable) declarations on UGMC_AbilitySystemComponent from the private: section to public::

  • AddImpulse(FVector Impulse, bool bVelChange = false)
  • SetActorLocation(FVector Location)

Motivation

Both functions are UFUNCTION(BlueprintCallable) — Blueprint reflection bypasses C++ access modifiers, so the BP-side surface works either way. But C++ callers get error C2248: cannot access private member declared in class 'UGMC_AbilitySystemComponent'.

The asymmetry is a code-organization bug: BlueprintCallable methods are by definition part of the component's public API. Anyone consuming GMAS from C++ (e.g., a custom combat library that wants to issue a server-side knockback impulse) currently has to either route through Blueprint, use UFunction reflection + ProcessEvent, or patch the plugin header locally.

Concrete example consumer: an ILCombatLibrary::ProcessAbilityHit function that takes a knockback impulse + hangtime and applies it via TargetASC->AddImpulse(FinalImpulse, /*bVelChange=*/ true). Before this fix, the call failed to compile with C2248.

Scope

ExecuteSyncedEvent (also in the same private block) is intentionally NOT moved — it's the internal dispatcher driven by the bound queue, not external-caller-facing API.

Test plan

  • Compiles clean against current dev
  • BP-side AddImpulse / SetActorLocation nodes work identically (no UFUNCTION metadata changed)
  • C++ caller can now invoke both methods directly

Files changed

  • Source/GMCAbilitySystem/Public/Components/GMCAbilityComponent.h — declarations moved from private to public, preserving UFUNCTION + DisplayName + Category + default arg

🤖 Generated with Claude Code

Both functions are UFUNCTION(BlueprintCallable) — Blueprint reflection
ignores C++ access modifiers, but C++ callers were locked out by the
private-block placement. Iliad's combat hit pipeline (UILCombatLibrary::
ProcessAbilityHit) needs to invoke AddImpulse from C++ for the
knockback step; without this fix, C2248 access errors block the build.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 18, 2026

Warning

Rate limit exceeded

@reznok has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 30 minutes before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: fba233eb-b638-4b81-a8e6-fd84dfc63b0d

📥 Commits

Reviewing files that changed from the base of the PR and between a0f924f and d06b5ad.

📒 Files selected for processing (1)
  • Source/GMCAbilitySystem/Public/Components/GMCAbilityComponent.h
✨ 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.

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