[PR #998] [MERGED] Server: run a dead player's chat commands, as vanilla does (#973) #2973

Closed
opened 2026-11-02 16:00:32 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: fix/dead-guest-commands


📝 Commits (1)

  • 4953305 Server: run a dead player's chat commands, as vanilla does (#973)

📊 Changes

3 files changed (+33 additions, -6 deletions)

View changed files

📝 crates/horizon-client/src/game/lan_actions.rs (+9 -1)
📝 mods/horizon/src/test/java/dev/horizonlab/parity/VanillaProtocolClient.java (+19 -3)
📝 tools/test_dedicated_server_parity.py (+5 -2)

📄 Description

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

Fixes #973. Part of #484.

What

On a Horizon server, a LAN host or a dedicated server, a dead player's commands were ignored. lan_guest_packet dropped every packet from a dead guest except the respawn request, so a command typed on the death screen never ran.

Vanilla 26.3 runs them. ServerGamePacketListenerImpl.handleChatCommand and handleSignedChatCommand go through tryHandleChat and performUnsignedChatCommand / performSignedChatCommand, and none of these looks at the player's health. Chat commands, signed or unsigned, from a dead guest now run like anyone else's. Every other packet is still dropped while dead. Plain chat already went through the hub.

Tested

New case in tools/test_dedicated_server_parity.py, a vanilla-codec client against a vanilla server and Horizon's dedicated server. After /kill the client sends /trigger nope from the death screen and records the reply before it respawns, or "no command reply" after 3 s.

  • On main: 1 differing line.
    -play-death command reply {"text":"","extra":[{"translate":"arguments.objective.notFound","with":["nope"]}],"color":"red"}
    +play-death no command reply
    
  • With this PR: the transcripts are identical. This ran on an integration commit with #999, #1000 and #1001: dedicated server: 604 transcript lines identical.

Self-check

On one integration build of the four #484 PRs (#998, #999, #1000, #1001), on main at dbfaf2e0. The branches sit on ee59df13, which adds only #980's renderer change, which none of them touch:

cargo fmt --all -- --check                                ok (each branch too)
cargo clippy --workspace --all-targets -- -D warnings     ok
cargo test -p horizon-client                              ok: 920 + 77 + 15 + 2 + 2 + 2 + 1 passed, 0 failed
tools/test_dedicated_server_parity.py                     dedicated server: 604 transcript lines identical
tools/lan_e2e.py --check pvp chest crafting containers machines swings eat sign   all pass
tools/lan_e2e.py --check effects recipes projectiles                              all pass

Nothing needs Ludovic.

🤖 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/998 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/19/2026 **Status:** ✅ Merged **Merged:** 10/19/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/dead-guest-commands` --- ### 📝 Commits (1) - [`4953305`](https://github.com/horizon-rust/horizon/commit/4953305c7b4bef4f6973f582f5e94abd2a93cbf6) Server: run a dead player's chat commands, as vanilla does (#973) ### 📊 Changes **3 files changed** (+33 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/lan_actions.rs` (+9 -1) 📝 `mods/horizon/src/test/java/dev/horizonlab/parity/VanillaProtocolClient.java` (+19 -3) 📝 `tools/test_dedicated_server_parity.py` (+5 -2) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Fixes #973. Part of #484. ## What On a Horizon server, a LAN host or a dedicated server, a dead player's commands were ignored. `lan_guest_packet` dropped every packet from a dead guest except the respawn request, so a command typed on the death screen never ran. Vanilla 26.3 runs them. `ServerGamePacketListenerImpl.handleChatCommand` and `handleSignedChatCommand` go through `tryHandleChat` and `performUnsignedChatCommand` / `performSignedChatCommand`, and none of these looks at the player's health. Chat commands, signed or unsigned, from a dead guest now run like anyone else's. Every other packet is still dropped while dead. Plain chat already went through the hub. ## Tested New case in `tools/test_dedicated_server_parity.py`, a vanilla-codec client against a vanilla server and Horizon's dedicated server. After `/kill` the client sends `/trigger nope` from the death screen and records the reply before it respawns, or "no command reply" after 3 s. - **On main:** 1 differing line. ``` -play-death command reply {"text":"","extra":[{"translate":"arguments.objective.notFound","with":["nope"]}],"color":"red"} +play-death no command reply ``` - **With this PR:** the transcripts are identical. This ran on an integration commit with #999, #1000 and #1001: `dedicated server: 604 transcript lines identical`. ## Self-check On one integration build of the four #484 PRs (#998, #999, #1000, #1001), on main at dbfaf2e0. The branches sit on ee59df13, which adds only #980's renderer change, which none of them touch: ``` cargo fmt --all -- --check ok (each branch too) cargo clippy --workspace --all-targets -- -D warnings ok cargo test -p horizon-client ok: 920 + 77 + 15 + 2 + 2 + 2 + 1 passed, 0 failed tools/test_dedicated_server_parity.py dedicated server: 604 transcript lines identical tools/lan_e2e.py --check pvp chest crafting containers machines swings eat sign all pass tools/lan_e2e.py --check effects recipes projectiles all pass ``` Nothing needs Ludovic. 🤖 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-02 16:00:32 +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#2973
No description provided.