[PR #7768] Guest deaths award deaths stat and deathCount, reset death timers #7809

Open
opened 2026-11-03 07:24:29 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/7768
Author: @Joansitoh
Created: 11/2/2026
Status: 🔄 Open

Base: main ← Head: fix/6885-guest-death-stats


📝 Commits (1)

  • 4e19cc0 Guest deaths award the deaths stat, deathCount and reset the death timers

📊 Changes

3 files changed (+41 additions, -3 deletions)

View changed files

📝 crates/horizon-client/src/game/lan_actions.rs (+10 -3)
📝 crates/horizon-client/src/game/scoreboard.rs (+11 -0)
📝 crates/horizon-client/src/game/stats.rs (+20 -0)

📄 Description

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

What

Guest deaths (LAN guests, dedicated-server players and the server-thread window player, all through Game::guest_die) now do what vanilla ServerPlayer.die does for stats: increment deathCount objectives (after the drops), award the deaths custom stat, and reset time_since_death and time_since_rest.

Vanilla reference

ServerPlayer.die (26.3): forAllObjectives(DEATH_COUNT), awardStat(Stats.DEATHS), resetStat(TIME_SINCE_DEATH), resetStat(TIME_SINCE_REST).

Scope

Part of #6885. Not in this PR: the killed_by stat and the entity_killed_player trigger (need the guest CombatTracker swap). The deprecated in-frame path is untouched.

How tested

  • New unit test death_resets_the_timers_since_death_and_rest.
  • Harnesses: scoreboard, server_player_damage, dedicated_server: 3 passed, 0 failed.
  • The guest death path itself has no unit-test fixture (no Game + LanHost guest in tests), so it is covered by the harnesses and not by a dedicated test.

pr_ready.py --quick --base upstream/main: scope 3 files +41 −3, Python tests 614 passed, rustfmt ✅, clippy ✅, horizon-client tests 712 passed, doc tests ✅, mod API ✅.

Remaining affected harnesses: run by CI's parity job.

Suggested label: none

🤖 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/7768 **Author:** [@Joansitoh](https://github.com/Joansitoh) **Created:** 11/2/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/6885-guest-death-stats` --- ### 📝 Commits (1) - [`4e19cc0`](https://github.com/horizon-rust/horizon/commit/4e19cc0a83aced9335ca0713a09ce9601a37aff8) Guest deaths award the deaths stat, deathCount and reset the death timers ### 📊 Changes **3 files changed** (+41 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/lan_actions.rs` (+10 -3) 📝 `crates/horizon-client/src/game/scoreboard.rs` (+11 -0) 📝 `crates/horizon-client/src/game/stats.rs` (+20 -0) </details> ### 📄 Description > 🤖 Opened by Joansitoh's AI agent (Claude Code, Sonnet 5.5), not by Joansitoh personally. ## What Guest deaths (LAN guests, dedicated-server players and the server-thread window player, all through `Game::guest_die`) now do what vanilla `ServerPlayer.die` does for stats: increment `deathCount` objectives (after the drops), award the `deaths` custom stat, and reset `time_since_death` and `time_since_rest`. ## Vanilla reference `ServerPlayer.die` (26.3): `forAllObjectives(DEATH_COUNT)`, `awardStat(Stats.DEATHS)`, `resetStat(TIME_SINCE_DEATH)`, `resetStat(TIME_SINCE_REST)`. ## Scope Part of #6885. Not in this PR: the `killed_by` stat and the `entity_killed_player` trigger (need the guest CombatTracker swap). The deprecated in-frame path is untouched. ## How tested - New unit test `death_resets_the_timers_since_death_and_rest`. - Harnesses: `scoreboard`, `server_player_damage`, `dedicated_server`: 3 passed, 0 failed. - The guest death path itself has no unit-test fixture (no `Game` + `LanHost` guest in tests), so it is covered by the harnesses and not by a dedicated test. `pr_ready.py --quick --base upstream/main`: scope 3 files +41 −3, Python tests 614 passed, rustfmt ✅, clippy ✅, horizon-client tests 712 passed, doc tests ✅, mod API ✅. Remaining affected harnesses: run by CI's parity job. Suggested label: none 🤖 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>
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#7809
No description provided.