[PR #158] [MERGED] Play normal arrow impact audio for player hits #2361

Closed
opened 2026-11-02 15:55:20 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/158
Author: @Online5277
Created: 10/14/2026
Status: ✅ Merged
Merged: 10/14/2026
Merged by: @ludovic111

Base: main ← Head: fix/arrow-hit-sound


📝 Commits (1)

  • db1a895 fix(client): play the arrow impact sound for player hits

📊 Changes

1 file changed (+84 additions, -39 deletions)

View changed files

📝 crates/horizon-client/src/game/creatures.rs (+84 -39)

📄 Description

When a skeleton arrow or a self-fired arrow hit the local player, the client played entity.arrow.hit_player, the shooter's private confirmation ping, at full volume. Successful hits now use the normal entity.arrow.hit impact sound at volume 1 with the vanilla randomized pitch. Self-shots produce the same impact sound without a confirmation ping.

Return the existing accepted-damage result from the player hurt routine and use it to gate impact audio. Share the sound policy with the mob and block impact paths; rejected entity damage stays silent and consumes no pitch draw. Tipped-arrow player effects follow accepted damage too.

Fixes #130.

Validation: Rust tests cover the production sound ID, volume, seeded pitch, one pitch draw on accepted damage, and no sound/draw on rejected damage. Workspace Rust tests, warning-denied workspace/all-target Clippy, formatting and public-tree history checks pass. The user supplied a focused source comparison of pinned 26.3 AbstractArrow.onHitEntity, ClientPacketListener.handleGameEvent and SoundEvents for the sound and owner rules.

No client was launched; skeleton shots, self-shots, and rejected/shielded hits still need an in-game audio check. This is the local impact-sound fix; remote shooter-confirmation packet handling and broader projectile behavior were not audited. Separate PR #150's startup-settings change is not included.


🔄 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/158 **Author:** [@Online5277](https://github.com/Online5277) **Created:** 10/14/2026 **Status:** ✅ Merged **Merged:** 10/14/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/arrow-hit-sound` --- ### 📝 Commits (1) - [`db1a895`](https://github.com/horizon-rust/horizon/commit/db1a895c05d1bc8fcd682f5a350f96a0f75ba7e2) fix(client): play the arrow impact sound for player hits ### 📊 Changes **1 file changed** (+84 additions, -39 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/creatures.rs` (+84 -39) </details> ### 📄 Description When a skeleton arrow or a self-fired arrow hit the local player, the client played `entity.arrow.hit_player`, the shooter's private confirmation ping, at full volume. Successful hits now use the normal `entity.arrow.hit` impact sound at volume 1 with the vanilla randomized pitch. Self-shots produce the same impact sound without a confirmation ping. Return the existing accepted-damage result from the player hurt routine and use it to gate impact audio. Share the sound policy with the mob and block impact paths; rejected entity damage stays silent and consumes no pitch draw. Tipped-arrow player effects follow accepted damage too. Fixes #130. Validation: Rust tests cover the production sound ID, volume, seeded pitch, one pitch draw on accepted damage, and no sound/draw on rejected damage. Workspace Rust tests, warning-denied workspace/all-target Clippy, formatting and public-tree history checks pass. The user supplied a focused source comparison of pinned 26.3 `AbstractArrow.onHitEntity`, `ClientPacketListener.handleGameEvent` and `SoundEvents` for the sound and owner rules. No client was launched; skeleton shots, self-shots, and rejected/shielded hits still need an in-game audio check. This is the local impact-sound fix; remote shooter-confirmation packet handling and broader projectile behavior were not audited. Separate PR #150's startup-settings change is not included. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 15:55:20 +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#2361
No description provided.