[PR #2024] [MERGED] Item cooldowns: tick them on the server client's path too #3946

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

📋 Pull Request Information

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

Base: main ← Head: fix/remote-cooldown-tick


📝 Commits (1)

  • bf29618 Item cooldowns: tick them on the server client's path too

📊 Changes

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

View changed files

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

📄 Description

🤖 Opened by levzzz5154's AI agent ([CC], deepseek-v4.1-flash), not by levzzz5154.

What and why

Follow-up to #1933, from rdbtCVS's review there: the client's cooldowns were only ticked in tick_world, which
Game::tick skips whenever remote is set — every multiplayer session and the default single player. On that
path a thrown pearl's slot stayed at full shade until the server's duration-0 packet arrived instead of fading
over the second.

tick_remote_level now advances them (Player.tick's ItemCooldowns.tick); the groups that end are dropped
silently, as the client's plain ItemCooldowns.onCooldownEnded does. tick_world keeps its call for the in-frame
window and the server's own player.

Verification

Default path (server thread, survival, 16 pearls), one throw, screenshots ~35 ms apart, shaded rows of the hotbar
slot (16 rows = full, ~3 = none, from the item's own highlights):

Build Samples after the throw After 1.2 s
before this change (8cf51888) 15, 15, 15, 15, 15, 15, 15, 15 2
this branch 14, 14, 13, 12, 11, 10, 10, 9 4

The shade fades continuously now (~4.5 rows per 0.28 s, the 16 rows of a 20-tick entry) instead of staying pinned
and vanishing when the server says the entry ended.

Scope

One file, +6 (crates/horizon-client/src/game/remote.rs).

🤖 Generated with [CC].

Self-check

pr_ready (tools/pr_ready.py --quick --base upstream/main on cachyos-x8664, merge base 8cf51888, 2 min 37 s)

Check Result
Scope ✅ 1 files, +6 −0
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ➖ no Python change
rustfmt ✅ (4 s)
clippy ❌ failed (9 s)
tests: horizon-client ✅ 1292 passed (2 min 20 s)
doc tests ✅ 0 passed (2 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ 257 affected, to run in CI (--quick)
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

clippy fails on crates/horizon-client/src/mobs/axolotl.rs:169 (overly_complex_bool_expr), which fails the same way on upstream/main at 8cf51888: nothing in this branch touches it.


🔄 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/2024 **Author:** [@levzzz5154](https://github.com/levzzz5154) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/26/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/remote-cooldown-tick` --- ### 📝 Commits (1) - [`bf29618`](https://github.com/horizon-rust/horizon/commit/bf2961834be7c29a8fe46861d55c82e42d2f82ff) Item cooldowns: tick them on the server client's path too ### 📊 Changes **1 file changed** (+6 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/remote.rs` (+6 -0) </details> ### 📄 Description > 🤖 Opened by levzzz5154's AI agent ([CC], deepseek-v4.1-flash), not by levzzz5154. ## What and why Follow-up to #1933, from rdbtCVS's review there: the client's cooldowns were only ticked in `tick_world`, which `Game::tick` skips whenever `remote` is set — every multiplayer session and the default single player. On that path a thrown pearl's slot stayed at full shade until the server's duration-0 packet arrived instead of fading over the second. `tick_remote_level` now advances them (`Player.tick`'s `ItemCooldowns.tick`); the groups that end are dropped silently, as the client's plain `ItemCooldowns.onCooldownEnded` does. `tick_world` keeps its call for the in-frame window and the server's own player. ## Verification Default path (server thread, survival, 16 pearls), one throw, screenshots ~35 ms apart, shaded rows of the hotbar slot (16 rows = full, ~3 = none, from the item's own highlights): | Build | Samples after the throw | After 1.2 s | | --- | --- | --- | | before this change (8cf51888) | 15, 15, 15, 15, 15, 15, 15, 15 | 2 | | this branch | 14, 14, 13, 12, 11, 10, 10, 9 | 4 | The shade fades continuously now (~4.5 rows per 0.28 s, the 16 rows of a 20-tick entry) instead of staying pinned and vanishing when the server says the entry ended. ## Scope One file, +6 (`crates/horizon-client/src/game/remote.rs`). 🤖 Generated with [[CC]](https://github.com/levzzz5154/horizon). ## Self-check **pr_ready** (`tools/pr_ready.py --quick --base upstream/main` on cachyos-x8664, merge base 8cf51888, 2 min 37 s) | Check | Result | | --- | --- | | Scope | ✅ 1 files, +6 −0 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ➖ no Python change | | rustfmt | ✅ (4 s) | | clippy | ❌ failed (9 s) | | tests: horizon-client | ✅ 1292 passed (2 min 20 s) | | doc tests | ✅ 0 passed (2 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ 257 affected, to run in CI (--quick) | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | `clippy` fails on `crates/horizon-client/src/mobs/axolotl.rs:169` (`overly_complex_bool_expr`), which fails the same way on `upstream/main` at 8cf51888: nothing in this branch touches it. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:13:29 +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#3946
No description provided.