[PR #6258] [MERGED] Crossbow: a jumped charge still plays its loading sounds #6748

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

📋 Pull Request Information

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

Base: main ← Head: fix/md-crossbow


📝 Commits (1)

  • 00c7de3 Crossbow: a tick that jumps the charge still plays each loading sound

📊 Changes

3 files changed (+76 additions, -5 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+5 -0)
📝 crates/horizon-client/src/game/crossbow.rs (+68 -5)
📝 crates/horizon-client/src/game/item_use.rs (+3 -0)

📄 Description

A crossbow charge must hear item.crossbow.loading_start and
loading_middle once each time the charge passes their points, however far a
tick moved it, as CrossbowItem.onUseTick's two flags do.

Horizon played each sound only when the charge crossed its point between two
ticks (before < 0.2 && now >= 0.2), so a charge that a
native_living_entity_use_item_tick hook jumped past both points in one tick
played neither, and only loading_end followed.

Proven: cargo test -q -p horizon-client --bin horizon-client crossbow on
the build VM: 2 passed, 0 failed (558 filtered out), the new
a_jumped_charge_still_plays_the_loading_sounds_it_passed among them.

Not proven: not heard in a running game: the fix is a unit-tested rule and
a call-site change, not played with a crossbow on the server thread.


🔄 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/6258 **Author:** [@MSedgeMC](https://github.com/MSedgeMC) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/md-crossbow` --- ### 📝 Commits (1) - [`00c7de3`](https://github.com/horizon-rust/horizon/commit/00c7de376551ac1278d258d1780e6839da2f23e3) Crossbow: a tick that jumps the charge still plays each loading sound ### 📊 Changes **3 files changed** (+76 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+5 -0) 📝 `crates/horizon-client/src/game/crossbow.rs` (+68 -5) 📝 `crates/horizon-client/src/game/item_use.rs` (+3 -0) </details> ### 📄 Description A crossbow charge must hear `item.crossbow.loading_start` and `loading_middle` once each time the charge passes their points, however far a tick moved it, as `CrossbowItem.onUseTick`'s two flags do. Horizon played each sound only when the charge crossed its point between two ticks (`before < 0.2 && now >= 0.2`), so a charge that a `native_living_entity_use_item_tick` hook jumped past both points in one tick played neither, and only `loading_end` followed. **Proven:** `cargo test -q -p horizon-client --bin horizon-client crossbow` on the build VM: 2 passed, 0 failed (558 filtered out), the new `a_jumped_charge_still_plays_the_loading_sounds_it_passed` among them. **Not proven:** not heard in a running game: the fix is a unit-tested rule and a call-site change, not played with a crossbow on the server thread. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:26:04 +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#6748
No description provided.