[PR #4155] [CLOSED] Play the hurt sound for a remote player taking damage #5445

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4155
Author: @DUzzL
Created: 10/30/2026
Status: ❌ Closed

Base: main ← Head: fix/issue-4149-remote-player-hurt-sound


📝 Commits (1)

  • f132e1c Play the player's own hurt sound on a server damage event

📊 Changes

1 file changed (+31 additions, -2 deletions)

View changed files

📝 crates/horizon-client/src/game/remote.rs (+31 -2)

📄 Description

🤖 Opened by DUzzL's AI agent, not by DUzzL personally.

Partially addresses #4149. This PR fixes only the multiplayer part (no hurt sound). The singleplayer part (wrong sound) is not addressed and not confirmed. This PR does not close the issue.

Cause: in game/remote.rs, the DamageEvent handler for the local player animated the hurt tilt and flash but played no sound. The comment said the host sends the sound, but the LAN host plays it only locally and sends nothing to guests.

Change: DamageEvent for the local player plays the hurt sound from the damage type's effects. remote_hurt_sound in remote.rs reads the synced registry data and falls back to the local damage type by name, then to "hurt". The event is sent only when damage is actually taken, so the host's own hit is not doubled.

Tested: cargo fmt --check and cargo clippy -p horizon-client --all-targets -- -D warnings pass. cargo test -p horizon-client --lib health passes (5 tests) and cargo test -p horizon-client --bins remote passes (27 tests). No new test was added.

Not tested: no in-game or LAN run. No vanilla source check. The singleplayer repro was not examined. tools/pr_ready.py not run.


🔄 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/4155 **Author:** [@DUzzL](https://github.com/DUzzL) **Created:** 10/30/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/issue-4149-remote-player-hurt-sound` --- ### 📝 Commits (1) - [`f132e1c`](https://github.com/horizon-rust/horizon/commit/f132e1cf997f47bb0ef5e6e8ad9ea8855416798e) Play the player's own hurt sound on a server damage event ### 📊 Changes **1 file changed** (+31 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/remote.rs` (+31 -2) </details> ### 📄 Description > 🤖 Opened by DUzzL's AI agent, not by DUzzL personally. Partially addresses #4149. This PR fixes only the multiplayer part (no hurt sound). The singleplayer part (wrong sound) is not addressed and not confirmed. This PR does not close the issue. **Cause:** in `game/remote.rs`, the `DamageEvent` handler for the local player animated the hurt tilt and flash but played no sound. The comment said the host sends the sound, but the LAN host plays it only locally and sends nothing to guests. **Change:** `DamageEvent` for the local player plays the hurt sound from the damage type's `effects`. `remote_hurt_sound` in `remote.rs` reads the synced registry data and falls back to the local damage type by name, then to "hurt". The event is sent only when damage is actually taken, so the host's own hit is not doubled. **Tested:** `cargo fmt --check` and `cargo clippy -p horizon-client --all-targets -- -D warnings` pass. `cargo test -p horizon-client --lib health` passes (5 tests) and `cargo test -p horizon-client --bins remote` passes (27 tests). No new test was added. **Not tested:** no in-game or LAN run. No vanilla source check. The singleplayer repro was not examined. `tools/pr_ready.py` not run. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:12:39 +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#5445
No description provided.