[PR #736] [MERGED] Restore saved death and health when reopening worlds #2768

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

📋 Pull Request Information

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

Base: main ← Head: fix/death-screen-save


📝 Commits (1)

  • 95b4b74 Restore saved death and health on world entry (#729)

📊 Changes

3 files changed (+67 additions, -17 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+10 -11)
📝 crates/horizon-client/src/motion.rs (+46 -6)
📝 crates/horizon-client/src/save.rs (+11 -0)

📄 Description

Quitting from the death screen correctly saved zero health and an empty inventory, but world entry only restored positive health during the application's first two ticks. Rejoining revived the player, and later world entries also discarded saved non-full health/food.

Restore health, food and environment once per world opening, including zero health. A loaded dead player enters the death screen directly, preserving the existing drops and death statistics; respawning starts with fresh health and food. Addresses #729.

Validation: extended the existing real-motion restoration regression and disk save round-trip (dead health and stale inventory/equipment clearing). Native death → title → rejoin twice retains zero health and an empty inventory, with death count still one; Respawn gives 20 health. A later pause-menu save/rejoin preserves 13 health and two emeralds. Fast client build, all-target client Clippy with warnings denied, formatting and whitespace checks pass.

The reported inventory duplication did not reproduce on current main; no inventory serialization change was needed. Draft for manual survival/keep-inventory testing. Validation covers in-frame single player; integrated-server/LAN behavior and broader parity remain untested.


🔄 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/736 **Author:** [@Online5277](https://github.com/Online5277) **Created:** 10/17/2026 **Status:** ✅ Merged **Merged:** 10/17/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/death-screen-save` --- ### 📝 Commits (1) - [`95b4b74`](https://github.com/horizon-rust/horizon/commit/95b4b7422d875dd69e28000e02c780e2500adff1) Restore saved death and health on world entry (#729) ### 📊 Changes **3 files changed** (+67 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+10 -11) 📝 `crates/horizon-client/src/motion.rs` (+46 -6) 📝 `crates/horizon-client/src/save.rs` (+11 -0) </details> ### 📄 Description Quitting from the death screen correctly saved zero health and an empty inventory, but world entry only restored positive health during the application's first two ticks. Rejoining revived the player, and later world entries also discarded saved non-full health/food. Restore health, food and environment once per world opening, including zero health. A loaded dead player enters the death screen directly, preserving the existing drops and death statistics; respawning starts with fresh health and food. Addresses #729. Validation: extended the existing real-motion restoration regression and disk save round-trip (dead health and stale inventory/equipment clearing). Native death → title → rejoin twice retains zero health and an empty inventory, with death count still one; Respawn gives 20 health. A later pause-menu save/rejoin preserves 13 health and two emeralds. Fast client build, all-target client Clippy with warnings denied, formatting and whitespace checks pass. The reported inventory duplication did not reproduce on current main; no inventory serialization change was needed. Draft for manual survival/keep-inventory testing. Validation covers in-frame single player; integrated-server/LAN behavior and broader parity remain untested. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 15:58:54 +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#2768
No description provided.