[PR #2279] [MERGED] Stop the endless camera shake after death and while riding (server thread) #4166

Closed
opened 2026-11-03 04:15:10 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2279
Author: @kacpherek
Created: 10/26/2026
Status: ✅ Merged
Merged: 10/27/2026
Merged by: @ludovic111

Base: main ← Head: fix/2276-dead-hurt-tilt


📝 Commits (1)

  • 6f4c2cf Count the hurt tilt down while the player is dead or riding

📊 Changes

1 file changed (+5 additions, -0 deletions)

View changed files

📝 crates/horizon-client/src/game/remote.rs (+5 -0)

📄 Description

What and why

After dying in single player, the camera kept shaking on the death screen for as long as it stayed open.

On the server thread the window's player counts its hurt tilt down in controlled_simulation_tick, which is
skipped while the player is dead or riding. The killing hit set the tilt to 10 and nothing counted it down
again, so every frame drew the start of the hurt tilt with a new partial tick: an endless shake. The same
happened for a hit taken while riding: the tilt stayed until the player got off. The death roll itself (#1978)
was fine. Now the hurt clock still advances on those ticks, as LivingEntity.baseTick does for every living
entity.

Checked with horizon-ctl on the server thread (three zombies, state → player.hurt_time / death_time
after death): before, hurt_time stayed at 10 while death_time rose; now it falls to 0 within the first
half second and the death roll goes on.

Fixes #2276.

Vanilla reference

  • LivingEntity.baseTick: if (this.hurtTime > 0) --this.hurtTime;, run every tick, dead or riding.
  • LivingEntity.tick → tickDeath while dead; Entity.rideTick for a passenger, which still calls tick.
  • GameRenderer.bobHurt: the tilt from hurtTime - partialTicks.

Self-check

cargo check -p horizon-client passes.


🔄 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/2279 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/2276-dead-hurt-tilt` --- ### 📝 Commits (1) - [`6f4c2cf`](https://github.com/horizon-rust/horizon/commit/6f4c2cfbbc9dad4ef51e695c08a1d086fd88cf0d) Count the hurt tilt down while the player is dead or riding ### 📊 Changes **1 file changed** (+5 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/remote.rs` (+5 -0) </details> ### 📄 Description ## What and why After dying in single player, the camera kept shaking on the death screen for as long as it stayed open. On the server thread the window's player counts its hurt tilt down in `controlled_simulation_tick`, which is skipped while the player is dead or riding. The killing hit set the tilt to 10 and nothing counted it down again, so every frame drew the start of the hurt tilt with a new partial tick: an endless shake. The same happened for a hit taken while riding: the tilt stayed until the player got off. The death roll itself (#1978) was fine. Now the hurt clock still advances on those ticks, as `LivingEntity.baseTick` does for every living entity. Checked with `horizon-ctl` on the server thread (three zombies, `state` → `player.hurt_time` / `death_time` after death): before, `hurt_time` stayed at 10 while `death_time` rose; now it falls to 0 within the first half second and the death roll goes on. Fixes #2276. ## Vanilla reference - `LivingEntity.baseTick`: `if (this.hurtTime > 0) --this.hurtTime;`, run every tick, dead or riding. - `LivingEntity.tick` → `tickDeath` while dead; `Entity.rideTick` for a passenger, which still calls `tick`. - `GameRenderer.bobHurt`: the tilt from `hurtTime - partialTicks`. ## Self-check `cargo check -p horizon-client` passes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:15:10 +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#4166
No description provided.