[PR #665] [MERGED] Reset experience on respawn and drop capped XP on death #2712

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

📋 Pull Request Information

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

Base: main ← Head: fix/player-death-experience


📝 Commits (1)

  • 67633fc Reset player experience on respawn and award capped death XP

📊 Changes

4 files changed (+69 additions, -5 deletions)

View changed files

📝 crates/horizon-client/src/entities.rs (+45 -0)
📝 crates/horizon-client/src/game.rs (+6 -5)
📝 crates/horizon-client/src/game/lan_actions.rs (+14 -0)
📝 crates/horizon-client/src/game/screens.rs (+4 -0)

📄 Description

Players kept all their experience after respawning, and death produced no XP orbs. Clear level, progress and total XP on normal respawn; preserve them with keep_inventory or spectator mode. Award death orbs from the pre-death level using the pinned rule, seven points per level capped at 100.

Apply the same rules to the local player and server guests. Keep the dead player's XP until respawn so the existing death-screen score remains available, and reset guest XP before the hub sends the respawn SetExperience packet. Remote clients continue to use the server's authoritative experience packets.

Validation: regression tests cover the reward cap, partial progress, retained XP, resetting all three fields and earning XP after reset. Client all-target Clippy passes. In-game local/server death, orb pickup, keep_inventory and respawn-anchor behavior still need testing; this PR is a draft.

Fixes #621.


🔄 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/665 **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/player-death-experience` --- ### 📝 Commits (1) - [`67633fc`](https://github.com/horizon-rust/horizon/commit/67633fc7891a3c6f2bcd5443499a11ec0ed36360) Reset player experience on respawn and award capped death XP ### 📊 Changes **4 files changed** (+69 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/entities.rs` (+45 -0) 📝 `crates/horizon-client/src/game.rs` (+6 -5) 📝 `crates/horizon-client/src/game/lan_actions.rs` (+14 -0) 📝 `crates/horizon-client/src/game/screens.rs` (+4 -0) </details> ### 📄 Description Players kept all their experience after respawning, and death produced no XP orbs. Clear level, progress and total XP on normal respawn; preserve them with keep_inventory or spectator mode. Award death orbs from the pre-death level using the pinned rule, seven points per level capped at 100. Apply the same rules to the local player and server guests. Keep the dead player's XP until respawn so the existing death-screen score remains available, and reset guest XP before the hub sends the respawn SetExperience packet. Remote clients continue to use the server's authoritative experience packets. Validation: regression tests cover the reward cap, partial progress, retained XP, resetting all three fields and earning XP after reset. Client all-target Clippy passes. In-game local/server death, orb pickup, keep_inventory and respawn-anchor behavior still need testing; this PR is a draft. Fixes #621. --- <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:28 +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#2712
No description provided.