Client: Lumos (wand light) sync for remote players#57
Merged
Conversation
The owning client publishes the Lumos flag (LumosSpellTool::IsLumosActive — the sustained light state, not "is the Lumos tool selected"). Edge-triggered on the held flag, the proxy attaches a warm point light at the wand tip, holds the arm-up pose in the UpperBody slot (legs keep walking), and spawns HL's layered wand-tip FX (Cascade muzzle glow + Niagara lens flare); all torn down when it clears or the proxy despawns. Adds PlaySlotMontageLooping/StopMontageOnSkin.
Add Human.setLumos(bool) binding and a /lumosnpcs command that toggles the sustained Lumos flag on spawned NPCs, so the proxy's wand light + arm-up pose + tip FX can be eyeballed with one client.
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.
When a remote player turns on Lumos, their proxy now lights up, a warm wand-tip light, the raised-wand hold pose, and HL's own Lumos tip FX, and tears it all down when they turn it off. Stacks on the existing spell wire (the Lumos flag was already reserved in human_sync.hpp), so no new netcode bump.
Owning client publishes (UpdateLocal): the Lumos flag from LumosSpellTool::IsLumosActive(); the sustained light state, not "is the Lumos tool selected" (the tool stays selected after the light toggles off). On-foot only.
Remote proxy applies (UpdateLumos, edge-triggered on the held flag): on the rising edge it:
and on the falling edge (or proxy despawn) destroys the light, stops the hold montage, and deactivates the FX. The light/FX/wand are all GC-slot-guarded (a collected component is skipped, not dereferenced).
Test command: /lumosnpcs toggles the sustained Lumos on the NPCs (light + raised wand + tip glow); run it again to confirm clean teardown. Needs the server built from this branch (it adds the setLumos binding) + pixi run deploy-resources + restart.