[PR #2878] [MERGED] Count down Riptide's spin on a server's copy of a player #4667

Closed
opened 2026-11-03 05:07:03 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2878
Author: @leifiyoo
Created: 10/27/2026
Status: ✅ Merged
Merged: 10/28/2026
Merged by: @rdbtCVS

Base: main ← Head: riptide-spin-server-countdown


📝 Commits (1)

  • de286f2 Count down Riptide's spin on a server's copy of a player

📊 Changes

3 files changed (+55 additions, -0 deletions)

View changed files

📝 crates/horizon-client/src/game/lan_actions.rs (+3 -0)
📝 crates/horizon-client/src/motion.rs (+40 -0)
📝 crates/horizon-client/src/pose.rs (+12 -0)

📄 Description

🤖 Opened by leifiyoo's AI agent (Claude Code), not by leifiyoo himself.

What and why

A player riding a riptide spin on a LAN guest or dedicated server kept the spin on the server's copy of that player forever: the countdown only ran in the client tick, and the server's guest tick never decremented it. From then on every bow shot or thrown trident from that player spawned at leg height, and other clients saw the spin flag stuck on.

This counts the server's copy down like LivingEntity.aiStep does, and clears the spin damage at zero, before the tick's pose update.

Fixes #2782.

Vanilla reference

  • LivingEntity.aiStep: the autoSpinAttackTicks countdown; Avatar.POSES SPIN_ATTACK eye height 0.4.
  • BowItem and ThrownTrident spawn at getEyeY() - 0.1, so a shot during the spin comes from about 0.3 above the feet. That part already matched vanilla; only the stuck spin was wrong.

Harness: none. The change is a state countdown on the server copy, covered by the unit test a_server_copy_of_a_riptide_spin_counts_down_and_stands_again in motion.rs.

Not verified

  • No live LAN or server repro: the host-side diagnosis comes from reading the code.
  • The copy's spin still does not end on entity or wall hits (only the countdown is mirrored), which is unchanged from before.
  • PR #2728 (client-side release on a server's client) was not tested alongside this change; the two address different parts.

Self-check

Run on Windows, python3 tools/pr_ready.py --quick --base upstream/main:

  • rustfmt: pass
  • clippy with -D warnings: pass
  • horizon-client lib tests, run single-threaded: 1161 passed, 2 failed (crash::tests::stacks_start_at_the_panicking_frame and save::tests::session_lock_is_exclusive, both Windows-only; this branch does not touch crash.rs or save.rs)
  • Python tests: fail on Windows, the same failures as on clean main

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/2878 **Author:** [@leifiyoo](https://github.com/leifiyoo) **Created:** 10/27/2026 **Status:** ✅ Merged **Merged:** 10/28/2026 **Merged by:** [@rdbtCVS](https://github.com/rdbtCVS) **Base:** `main` ← **Head:** `riptide-spin-server-countdown` --- ### 📝 Commits (1) - [`de286f2`](https://github.com/horizon-rust/horizon/commit/de286f236f9ce7feef916fa54f2abf058f506a7b) Count down Riptide's spin on a server's copy of a player ### 📊 Changes **3 files changed** (+55 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/lan_actions.rs` (+3 -0) 📝 `crates/horizon-client/src/motion.rs` (+40 -0) 📝 `crates/horizon-client/src/pose.rs` (+12 -0) </details> ### 📄 Description > 🤖 Opened by leifiyoo's AI agent (Claude Code), not by leifiyoo himself. ## What and why A player riding a riptide spin on a LAN guest or dedicated server kept the spin on the server's copy of that player forever: the countdown only ran in the client tick, and the server's guest tick never decremented it. From then on every bow shot or thrown trident from that player spawned at leg height, and other clients saw the spin flag stuck on. This counts the server's copy down like `LivingEntity.aiStep` does, and clears the spin damage at zero, before the tick's pose update. Fixes #2782. ## Vanilla reference - `LivingEntity.aiStep`: the `autoSpinAttackTicks` countdown; `Avatar.POSES` `SPIN_ATTACK` eye height 0.4. - `BowItem` and `ThrownTrident` spawn at `getEyeY() - 0.1`, so a shot during the spin comes from about 0.3 above the feet. That part already matched vanilla; only the stuck spin was wrong. Harness: none. The change is a state countdown on the server copy, covered by the unit test `a_server_copy_of_a_riptide_spin_counts_down_and_stands_again` in `motion.rs`. ## Not verified - No live LAN or server repro: the host-side diagnosis comes from reading the code. - The copy's spin still does not end on entity or wall hits (only the countdown is mirrored), which is unchanged from before. - PR #2728 (client-side release on a server's client) was not tested alongside this change; the two address different parts. ## Self-check Run on Windows, `python3 tools/pr_ready.py --quick --base upstream/main`: - rustfmt: pass - clippy with `-D warnings`: pass - `horizon-client` lib tests, run single-threaded: 1161 passed, 2 failed (`crash::tests::stacks_start_at_the_panicking_frame` and `save::tests::session_lock_is_exclusive`, both Windows-only; this branch does not touch `crash.rs` or `save.rs`) - Python tests: fail on Windows, the same failures as on clean `main` 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:07:03 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#4667
No description provided.