Client: spell cast sync for remote players#56
Merged
Merged
Conversation
On the owning client, detect a combat cast (combat-AnimBP FullBodyState==7), publish the Cast flag + which spell (1-based spell_records.hpp allowlist id) + aim pitch (the body never pitches on foot). On the rising edge the proxy plays a cast montage into DefaultSlot and fires the real spell via SpellHelper::CastSpell (VFX/projectile), aimed from synced facing-yaw + pitch. Allowlist id (not a raw path) so a proxy can only ever load a known spell record. Adds PlaySlotMontageOnSkin.
Add Human.setCasting(bool, spellId) binding and a /castnpcs command that loop- toggles the Cast flag on spawned NPCs (id 6 = Confringo) so each rising edge makes the proxy play the cast montage + fire the real spell — single-client test.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Remote players' spell casts now replay on their proxies; the cast animation plus the real spell VFX/projectile, aimed in 3D. Stacks on the locomotion/broom wire (the Cast flag + spellId/aimPitch fields were already reserved in human_sync.hpp), so no new netcode bump.
Owning client publishes (UpdateLocal):
Remote proxy applies (UpdateCast, on the Cast flag's rising edge):
The allowlist (range-checked, append-only, 1-based) bounds what a proxy can load — an out-of-range/hostile id just no-ops, never an arbitrary asset load.
Test command: /spawnnpc, t