Skip to content

Client: broom mount sync for remote players#54

Merged
Kheartz merged 2 commits into
mainfrom
broom-sync
Jun 27, 2026
Merged

Client: broom mount sync for remote players#54
Kheartz merged 2 commits into
mainfrom
broom-sync

Conversation

@Kheartz

@Kheartz Kheartz commented Jun 27, 2026

Copy link
Copy Markdown
Collaborator

Remote players (and server NPCs) are now shown riding broomsticks. When the owning client mounts a broom, remotes spawn the matching broom under the proxy, seat the rider on it, and fly it.

Stacks directly on the locomotion sync; no new wire bump, since the Mounted flag and mountId field were already reserved in human_sync.hpp.

Wire / publish (owning client)

  • Publishes mount state each tick: the Mounted state flag + which broom as a 1-based allowlist id (mount_records.hpp), read from the pawn's attach-parent class. Allowlist id (not a raw class string) so a proxy can only ever spawn a known broom.
  • Writes world velocity only while mounted (on foot it's zeroed so the delta serializer stays quiet).

Remote proxy (ClientHuman)

  • On the Mounted rising edge, spawns the allowlisted broom under the the game's playerAttachSocket; on dismount, destroys it and resets the gait latches so on-foot locomotion re-asserts.
  • While mounted the proxy is placed by dead-reckoning (position + velocity-age, age clamped to 250 ms) rather than the on-foot snapshot buffer; zero-latency for high-speed flight, with no fly-off on a stalled sender. The attached rider follows the driven broom.
  • Seat/facing corrections for BP_RemoteAvatarCCC (lift onto the broom + yaw alignment) as tunable constants.

Test: Human.setMounted(bool, mountId) + setVelocity(x,y,z) script bindings and a /broomnpcs command that mounts spawned NPCs and orbits them airborne, so broom sync can be eyeballed with a single client.

Kheartz added 2 commits June 27, 2026 01:03
Stacks on the locomotion wire (Mounted flag + mountId already reserved in
human_sync.hpp, so no new MAJOR bump). The owning client publishes mount state
from its pawn's attach parent (mapped to a 1-based allowlist id, mount_records.hpp)
+ its world velocity; remotes spawn the rideable broom under the proxy, seat it at
the game's playerAttachSocket, and drive it. While mounted the proxy is placed by
dead-reckoning (GetExtrapolatedPosition from pos+velocity) for zero-latency flight
instead of the on-foot snapshot buffer; on dismount the gait latches reset so
locomotion re-asserts. broom_experiment.cpp also keeps an offline dev harness.
Add Human.setMounted(bool, mountId) + setVelocity(x,y,z) bindings and a /broomnpcs
command that mounts spawned NPCs on a broom and orbits them fast + airborne (with
tangent velocity so the client's mounted dead-reckoning has data), so broom mount
sync can be eyeballed with one client (/spawnnpc, then /broomnpcs to mount/dismount).
@Kheartz Kheartz merged commit e2bcef6 into main Jun 27, 2026
2 checks passed
@Kheartz Kheartz deleted the broom-sync branch June 27, 2026 05:19
Kheartz added a commit that referenced this pull request Jun 27, 2026
Remote players (and server NPCs) are now shown riding broomsticks. When the owning client mounts a broom, remotes spawn the matching broom under the proxy, seat the rider on it, and fly it.

Stacks directly on the locomotion sync; no new wire bump, since the Mounted flag and mountId field were already reserved in human_sync.hpp.

Wire / publish (owning client)
- Publishes mount state each tick: the Mounted state flag + which broom as a 1-based allowlist id (mount_records.hpp), read from the pawn's attach-parent class. Allowlist id (not a raw class string) so a proxy can only ever spawn a known broom.
- Writes world velocity only while mounted (on foot it's zeroed so the delta serializer stays quiet).

Remote proxy (ClientHuman)
- On the Mounted rising edge, spawns the allowlisted broom under the the game's playerAttachSocket; on dismount, destroys it and resets the gait latches so on-foot locomotion re-asserts.
- While mounted the proxy is placed by dead-reckoning (position + velocity-age, age clamped to 250 ms) rather than the on-foot snapshot buffer; zero-latency for high-speed flight, with no fly-off on a stalled sender. The attached rider follows the driven broom.
- Seat/facing corrections for BP_RemoteAvatarCCC (lift onto the broom + yaw alignment) as tunable constants.

Test: Human.setMounted(bool, mountId) + setVelocity(x,y,z) script bindings and a /broomnpcs command that mounts spawned NPCs and orbits them airborne, so broom sync can be eyeballed with a single client.
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