[PR #5050] [MERGED] Start a restored nausea at full strength, as vanilla does #6027

Closed
opened 2026-11-03 05:16:43 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/5050
Author: @MSedgeMC
Created: 10/31/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @rdbtCVS

Base: main ← Head: fix/nausea-blend


📝 Commits (1)

  • ef638cf Start a restored nausea at full strength, as vanilla does

📊 Changes

4 files changed (+50 additions, -9 deletions)

View changed files

📝 crates/horizon-client-render/src/screen_effects.rs (+23 -0)
📝 crates/horizon-client/src/game/potions.rs (+16 -0)
📝 crates/horizon-client/src/game/remote.rs (+9 -3)
📝 crates/horizon-client/src/game/render_tick.rs (+2 -6)

📄 Description

Fixes the nausea half of MobEffectInstance.BlendState.setImmediate in the port ledger — the darkness half landed earlier, so the row's note was already half stale. (No issue.)

ClientPacketListener.handleUpdateMobEffect calls MobEffectInstance.skipBlending() when the packet's blend flag is clear, and BlendState.setImmediate sets the factor to hasEffect(instance) ? 1 : 0 — full strength immediately rather than fading in. That is exactly the path taken when a player joins, respawns or changes dimension, because Horizon's own send_active_effects sends the list unblended. So vanilla shows a restored nausea at once, and Horizon ramped its screen warp from zero over 150 ticks — a visible seven-second fade-in after every relog for a player with nausea.

The fix is the branch that already existed for darkness: a nausea_blend_added helper next to darkness_blend_added, one else if in remote_effect, and the blend-out guard (!ends_within(60)) moved into nausea_has_effect so there is one 60 rather than two. The blend-out ramp and the per-tick target are untouched, and no new state is introduced.

Proven: cargo test -p horizon-client --bin horizon-client a_new_nausea → 1 passed on a build box: 600 ticks with the blend flag gives 0, without it gives 1, 40 ticks left gives 0 (the advance guard), and infinite gives 1.

Not proven: nothing was watched in a game — the honest check is /effect give @s nausea 1200, save and quit, reopen, and look at the first frame rather than the tenth second. No harness: the status-effect oracle has no blend-state operation, and the darkness half shipped with only a unit test, so adding one means extending the oracle and a probe.

Two rows left behind deliberately: port_map/game-004.tsv's setImmediate row still says missing (the darkness commit did not update it either, and port_ledger.py check needs a build this checkout cannot do), and the deprecated in-frame path still starts the warp at zero, which AGENTS.md says not to maintain.


🔄 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/5050 **Author:** [@MSedgeMC](https://github.com/MSedgeMC) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@rdbtCVS](https://github.com/rdbtCVS) **Base:** `main` ← **Head:** `fix/nausea-blend` --- ### 📝 Commits (1) - [`ef638cf`](https://github.com/horizon-rust/horizon/commit/ef638cf2568b458dc054e9d1fae9d1f5362f25fb) Start a restored nausea at full strength, as vanilla does ### 📊 Changes **4 files changed** (+50 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/screen_effects.rs` (+23 -0) 📝 `crates/horizon-client/src/game/potions.rs` (+16 -0) 📝 `crates/horizon-client/src/game/remote.rs` (+9 -3) 📝 `crates/horizon-client/src/game/render_tick.rs` (+2 -6) </details> ### 📄 Description Fixes the nausea half of `MobEffectInstance.BlendState.setImmediate` in the port ledger — the darkness half landed earlier, so the row's note was already half stale. (No issue.) `ClientPacketListener.handleUpdateMobEffect` calls `MobEffectInstance.skipBlending()` when the packet's blend flag is clear, and `BlendState.setImmediate` sets the factor to `hasEffect(instance) ? 1 : 0` — full strength immediately rather than fading in. That is exactly the path taken when a player joins, respawns or changes dimension, because Horizon's own `send_active_effects` sends the list unblended. So vanilla shows a restored nausea at once, and Horizon ramped its screen warp from zero over 150 ticks — a visible seven-second fade-in after every relog for a player with nausea. The fix is the branch that already existed for darkness: a `nausea_blend_added` helper next to `darkness_blend_added`, one `else if` in `remote_effect`, and the blend-out guard (`!ends_within(60)`) moved into `nausea_has_effect` so there is one `60` rather than two. The blend-*out* ramp and the per-tick target are untouched, and no new state is introduced. **Proven:** `cargo test -p horizon-client --bin horizon-client a_new_nausea` → 1 passed on a build box: 600 ticks with the blend flag gives 0, without it gives 1, 40 ticks left gives 0 (the advance guard), and infinite gives 1. **Not proven:** nothing was watched in a game — the honest check is `/effect give @s nausea 1200`, save and quit, reopen, and look at the first frame rather than the tenth second. No harness: the status-effect oracle has no blend-state operation, and the darkness half shipped with only a unit test, so adding one means extending the oracle and a probe. Two rows left behind deliberately: `port_map/game-004.tsv`'s `setImmediate` row still says `missing` (the darkness commit did not update it either, and `port_ledger.py check` needs a build this checkout cannot do), and the deprecated in-frame path still starts the warp at zero, which `AGENTS.md` says not to maintain. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:16:43 +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#6027
No description provided.