[PR #5854] [MERGED] Native mods: screen_render_post skips the screen the server pack prompt hides #6524

Closed
opened 2026-11-03 06:22:20 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/5854
Author: @Sylviromi
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @ludovic111

Base: main ← Head: screen-render-post-prompt


📝 Commits (2)

  • 791ccd1 Native mods: screen_render_post skips the screen the server pack prompt hides
  • 865f808 Merge main into #5854

📊 Changes

2 files changed (+8 additions, -5 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+4 -3)
📝 crates/horizon-client/src/game/native_hooks.rs (+4 -2)

📄 Description

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

What and why

While the server pack prompt (PackConfirmScreen) is open, hud_layers draws Screen::Playing in place of the open screen, but fire_screen_render_post still reported self.screen. A mod drew over a screen that was not visible. It now skips that frame, as the input hooks already do through screen_over_playing. The doc comments say so.

This is the second point of a review on #5571 (comment). It refs #5543, which stays open.

Not game-tested: the server pack prompt cannot be raised in an offscreen game. The change is the one-line condition, traced against hud_layers.

Label: bug

Kind

  • parity
  • bug: a crash or a breakage
  • perf
  • feature
  • extra
  • tooling
  • docs

Vanilla reference

Vanilla's ScreenEvent.Render.Post fires for the screen that is actually rendered. No harness: Horizon's own draw order, no vanilla gameplay.

Other projects' code

none

Self-check

pr_ready (tools/pr_ready.py on boilingpoint, against origin/main at bd8c53bfa, 7 min 28 s)

Check Result
Scope ✅ 2 files, +8 −5
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 515 passed (57 s)
rustfmt ✅ (14 s)
clippy ✅ (3 min 26 s)
tests: horizon-client ✅ 1668 passed (2 min 49 s)
doc tests ✅ 0 passed (2 s)
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ not run (no vanilla data here): CI's parity job picks the affected harnesses
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

Refs #5543

🤖 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/5854 **Author:** [@Sylviromi](https://github.com/Sylviromi) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `screen-render-post-prompt` --- ### 📝 Commits (2) - [`791ccd1`](https://github.com/horizon-rust/horizon/commit/791ccd18da1136d7a376880db70f49f016b31a3f) Native mods: screen_render_post skips the screen the server pack prompt hides - [`865f808`](https://github.com/horizon-rust/horizon/commit/865f808792c4f306aefce69123a4b5fce4bad876) Merge main into #5854 ### 📊 Changes **2 files changed** (+8 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+4 -3) 📝 `crates/horizon-client/src/game/native_hooks.rs` (+4 -2) </details> ### 📄 Description > 🤖 Opened by Sylviromi's AI agent (Claude Code, Claude Sonnet 5.5), not by Sylviromi personally. ## What and why While the server pack prompt (`PackConfirmScreen`) is open, `hud_layers` draws `Screen::Playing` in place of the open screen, but `fire_screen_render_post` still reported `self.screen`. A mod drew over a screen that was not visible. It now skips that frame, as the input hooks already do through `screen_over_playing`. The doc comments say so. This is the second point of a review on #5571 ([comment](https://github.com/horizon-rust/horizon/pull/5571#issuecomment-6551358280)). It refs #5543, which stays open. Not game-tested: the server pack prompt cannot be raised in an offscreen game. The change is the one-line condition, traced against `hud_layers`. Label: bug ## Kind - [ ] parity - [x] bug: a crash or a breakage - [ ] perf - [ ] feature - [ ] extra - [ ] tooling - [ ] docs ## Vanilla reference Vanilla's `ScreenEvent.Render.Post` fires for the screen that is actually rendered. No harness: Horizon's own draw order, no vanilla gameplay. ## Other projects' code none ## Self-check **pr_ready** (`tools/pr_ready.py` on boilingpoint, against origin/main at bd8c53bfa, 7 min 28 s) | Check | Result | | --- | --- | | Scope | ✅ 2 files, +8 −5 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 515 passed (57 s) | | rustfmt | ✅ (14 s) | | clippy | ✅ (3 min 26 s) | | tests: horizon-client | ✅ 1668 passed (2 min 49 s) | | doc tests | ✅ 0 passed (2 s) | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ not run (no vanilla data here): CI's parity job picks the affected harnesses | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | Refs #5543 🤖 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-03 06:22:20 +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#6524
No description provided.