Skip to content

feat(gateway): root stunned players and show pitch and speed to observers - #699

Merged
Mathih13 merged 2 commits into
mainfrom
feat/opcode-parity-movement
Oct 15, 2026
Merged

Mathih13 merged 2 commits into
mainfrom
feat/opcode-parity-movement

Conversation

@Mathih13

@Mathih13 Mathih13 commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

#696 tells the owning client when a root, stun or polymorph holds it, and relays its receipt to peers. Several movement states still did not reach the client. A dead body could walk before release. A ghost could not walk on water. Observers never saw a creature rooted, another player's pitch while swimming, or another unit's sprint or slow speed. A movement acknowledgement on a boat ended the World Session, because the protocol library reads a later client's transport layout. A Game Master or cheat movement request with an unknown opcode or map also ended the session.

This change builds on #696 and keeps one path for each job:

  • One root rule. lyracore_shared::aura::holds_in_place decides for the owning client, a creature's observers and the Module's movement gate. The owning client's root now writes the build-5875 packed guid. The library's SMSG_FORCE_MOVE_ROOT writes a full guid, which the client misreads. A dead body stays rooted until release, also when its last hold ends at death. A ghost walks on water (SMSG_MOVE_WATER_WALK / _LAND_WALK). World entry restores both states. Observers see a creature's hold as SMSG_SPLINE_MOVE_ROOT / _UNROOT.
  • One relay to peers. fix(movement): roots hold a Character and moving ends Shadowmeld #696 relayed the root receipt as MSG_MOVE_STOP. It now relays as MSG_MOVE_ROOT, with the steering flags still dropped, so the Module's gate accepts it. The unroot receipt relays as MSG_MOVE_UNROOT and the water-walk receipt as MSG_MOVE_WATER_WALK, as cmangos does. A receipt on a transport now relays too. These receipts are not relayed between a same-map teleport and the client's MSG_MOVE_TELEPORT_ACK, because a release acknowledges the unroot at the corpse (cmangos IsBeingTeleportedNear).
  • Pitch messages relay to observers like other MSG_MOVE_* movement.
  • A slow lowers backward running (SMSG_FORCE_RUN_BACK_SPEED_CHANGE), at world entry and in a peer's CREATE too. Observers get another unit's run, backward run and swim speeds as SMSG_SPLINE_SET_*_SPEED. For players this deviates from cmangos, which relays MSG_MOVE_SET_*_SPEED after the owner's acknowledgement. The motion row holds only a MovementInfo body, so it cannot carry that speed.
  • Movement acknowledgements use the build-5875 layout. Cheat, Game Master and minigame movement requests and CMSG_MOVE_FALL_RESET are ignored without decoding, so they never move the Character. The inventory counts them as explicitly ignored.

The importer gives confuse, pacify and charm the polymorph mechanic, so holds_in_place roots them too. Telling them apart needs a distinct mechanic in the imported spell data. The Module change is small: MSG_MOVE_SET_PITCH coalesces like a heartbeat in the motion queue.

New durable tests, left to CI because SpacetimeDB is not run locally:

  • benilla_durable_a_stun_roots_the_client_across_reconnect_until_it_ends (Gateway): a stun roots the client through the aura relay, world entry roots it again, and the aura delete unroots it.
  • module/tests/pitch_motion.rs: a pitch change coalesces behind a staged transition.

#696's module/tests/movement_interrupts.rs is unchanged. Its Gateway receipt test now checks MSG_MOVE_ROOT. The root receipt constraints #704 moved to docs/benilla-compatibility.md#root-receipts now describe the MSG_MOVE_ROOT relay, the packed-guid root sender and transport receipts.

Verification:

  • Local checks: cargo fmt --all -- --check, clippy with -D warnings for the Gateway, Module and shared crates, cargo test -p lyracore-gateway, cargo test -p lyracore-shared, cargo test -p lyracore-module --lib --features=debug_reducers, the wasm check, the inventory example and its tests, and the durable targets with --no-run. All pass.
  • Comment review: the whole diff against main (source, tests, the inventory example and the linked doc). Passed. Retained comments are one-line opcode and packet-layout facts, library quirks, the teleport ordering constraint and pointers to docs/benilla-compatibility.md#root-receipts and #movement-controls, which resolve. The removed root_packet contract (no early unroot under overlapping holds) lives in that doc. The other removed comments moved with their code into codec::acknowledged_move.

Made by Claude Opus 5.5 in Claude Code.

🤖 Generated with Claude Code

@Mathih13
Mathih13 force-pushed the feat/opcode-parity-movement branch 2 times, most recently from 51db04d to 86772b4 Compare October 15, 2026 08:09
Mathih13 and others added 2 commits October 15, 2026 10:55
Add the pitch opcodes to the relayed movement set and name the observer
relays the Gateway records after a client acknowledges a root, unroot or
water walk. MSG_MOVE_SET_PITCH carries only the pose, so the motion queue
coalesces it like a heartbeat. A durable test covers that coalescing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Build on the root rule from #696. The owning client's root now uses the
build-5875 packed guid, and a dead body stays rooted until release. A ghost
walks on water, world entry restores both, and creatures root for observers
in spline form. The root receipt reaches peers as MSG_MOVE_ROOT, and the
unroot and water-walk receipts relay too, all while no teleport is pending.

Pitch relays to observers. A slow lowers backward running, at world entry
and in a peer's CREATE too. Observers get other units' speeds in spline
form. Movement acknowledgements use the build-5875 layout, so a transport
tail no longer ends the World Session. Cheat, Game Master and minigame
movement requests and the fall reset are ignored without decoding, and the
inventory counts them as explicitly ignored.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Mathih13
Mathih13 force-pushed the feat/opcode-parity-movement branch from 86772b4 to 70708c7 Compare October 15, 2026 09:04
@Mathih13
Mathih13 merged commit af95cb0 into main Oct 15, 2026
9 checks passed
@Mathih13
Mathih13 deleted the feat/opcode-parity-movement branch October 15, 2026 10:33
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