fix(component): move AddImpulse + SetActorLocation declarations to public#9
fix(component): move AddImpulse + SetActorLocation declarations to public#9reznok wants to merge 1 commit into
Conversation
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>
|
Warning Rate limit exceeded
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 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 configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ 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 |
Summary
Move two
UFUNCTION(BlueprintCallable)declarations onUGMC_AbilitySystemComponentfrom theprivate:section topublic::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 geterror 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
UFunctionreflection +ProcessEvent, or patch the plugin header locally.Concrete example consumer: an
ILCombatLibrary::ProcessAbilityHitfunction that takes a knockback impulse + hangtime and applies it viaTargetASC->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
AddImpulse/SetActorLocationnodes work identically (no UFUNCTION metadata changed)Files changed
Source/GMCAbilitySystem/Public/Components/GMCAbilityComponent.h— declarations moved from private to public, preserving UFUNCTION + DisplayName + Category + default arg🤖 Generated with Claude Code