[PR #5697] [MERGED] Fly picked-up tridents to their collector on server clients #6445

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/5697
Author: @ClickingMaster
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @ludovic111

Base: main ← Head: fix/trident-pickup-animation


📝 Commits (1)

  • bd837ad Fly picked-up tridents to their collector on server clients

📊 Changes

4 files changed (+94 additions, -27 deletions)

View changed files

📝 crates/horizon-client/src/game/pickups.rs (+4 -1)
📝 crates/horizon-client/src/game/remote.rs (+12 -2)
📝 crates/horizon-client/src/game/trident.rs (+40 -24)
📝 tools/lan_e2e.py (+38 -0)

📄 Description

🤖 Opened by ClickingMaster's AI agent (Claude Code, Claude Opus 5.5), not by ClickingMaster personally.

Fixes #5577 (the trident half; arrows already fly, covered by arrow_pickup).

Cause

A server's client keeps thrown tridents in self.tridents, apart from creatures.projectiles, so TakeItemEntity never found a trident: it was removed with no ItemPickupParticle. The host also sent the pickup only when the trident gave an item, so a creative player's trident vanished without the animation on other clients.

Change

  • remote.rs: TakeItemEntity also looks the id up in self.tridents, takes the trident out and adds it as a pickup particle (and places the pickup sound at it).
  • pickups.rs: Taken::Trident.
  • trident.rs: draws taken tridents at the particle's position; the host always sends take_item for a guest's pickup, creative ones included (vanilla AbstractArrow.playerTouch → Player.take).
  • lan_e2e.py: trident_pickup: each player throws a trident at their feet, gets it back, and both clients fly one trident pickup.

Tests

  • lan_e2e.py --check trident_pickup --check arrow_pickup: both PASS. Without the fix, trident_pickup FAILS (flown: 0 on both clients).
  • cargo fmt --check, cargo clippy -p horizon-client --no-default-features --lib --bins --tests -- -D warnings: clean.
  • cargo test -p horizon-client --no-default-features --lib --bins: 1106 + 479 + 18 passed.
  • port_ledger.py check --base origin/main: trident_taken ports AbstractArrow.playerTouch; it opens no new gaps (the arrows.rs notes and the uncited add_pickup_toward predate this branch).

Notes: built with --no-default-features (this machine has no ALSA headers), so I could not run tools/pr_ready.py and have no block from it to paste. The e2e run needed #5593 reverted locally because of #5678 (the crash on load, RTX 2060); that revert is not in this branch. The e2e checks were rerun on this exact commit (bd837ade7) and pass. The parity harnesses need vanilla data I don't have, so CI covers them.

🤖 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/5697 **Author:** [@ClickingMaster](https://github.com/ClickingMaster) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/trident-pickup-animation` --- ### 📝 Commits (1) - [`bd837ad`](https://github.com/horizon-rust/horizon/commit/bd837ade74a3d64de115546f3c1ac26edb0086ac) Fly picked-up tridents to their collector on server clients ### 📊 Changes **4 files changed** (+94 additions, -27 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/pickups.rs` (+4 -1) 📝 `crates/horizon-client/src/game/remote.rs` (+12 -2) 📝 `crates/horizon-client/src/game/trident.rs` (+40 -24) 📝 `tools/lan_e2e.py` (+38 -0) </details> ### 📄 Description > 🤖 Opened by ClickingMaster's AI agent (Claude Code, Claude Opus 5.5), not by ClickingMaster personally. Fixes #5577 (the trident half; arrows already fly, covered by `arrow_pickup`). ## Cause A server's client keeps thrown tridents in `self.tridents`, apart from `creatures.projectiles`, so `TakeItemEntity` never found a trident: it was removed with no `ItemPickupParticle`. The host also sent the pickup only when the trident gave an item, so a creative player's trident vanished without the animation on other clients. ## Change - `remote.rs`: `TakeItemEntity` also looks the id up in `self.tridents`, takes the trident out and adds it as a pickup particle (and places the pickup sound at it). - `pickups.rs`: `Taken::Trident`. - `trident.rs`: draws taken tridents at the particle's position; the host always sends `take_item` for a guest's pickup, creative ones included (vanilla `AbstractArrow.playerTouch` → `Player.take`). - `lan_e2e.py`: `trident_pickup`: each player throws a trident at their feet, gets it back, and both clients fly one trident pickup. ## Tests - `lan_e2e.py --check trident_pickup --check arrow_pickup`: both PASS. Without the fix, `trident_pickup` FAILS (`flown: 0` on both clients). - `cargo fmt --check`, `cargo clippy -p horizon-client --no-default-features --lib --bins --tests -- -D warnings`: clean. - `cargo test -p horizon-client --no-default-features --lib --bins`: 1106 + 479 + 18 passed. - `port_ledger.py check --base origin/main`: `trident_taken` ports `AbstractArrow.playerTouch`; it opens no new gaps (the `arrows.rs` notes and the uncited `add_pickup_toward` predate this branch). Notes: built with `--no-default-features` (this machine has no ALSA headers), so I could not run `tools/pr_ready.py` and have no block from it to paste. The e2e run needed #5593 reverted locally because of #5678 (the crash on load, RTX 2060); that revert is not in this branch. The e2e checks were rerun on this exact commit (bd837ade7) and pass. The parity harnesses need vanilla data I don't have, so CI covers them. 🤖 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 06:20:44 +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#6445
No description provided.