[PR #1710] [MERGED] Server clients: primed TNT falls and burns its fuse by itself between updates #3705

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

📋 Pull Request Information

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

Base: main ← Head: fix/remote-tnt


📝 Commits (5)

  • 1fa4697 Server clients: primed TNT falls and burns its fuse by itself between updates
  • 8d9e1e9 Merge remote-tracking branch 'origin/main' into fix/remote-tnt
  • e6b0f92 Merge main
  • 2a85b6a Merge origin/main into fix/remote-tnt
  • 55c961b Merge origin/main into fix/remote-tnt

📊 Changes

4 files changed (+64 additions, -20 deletions)

View changed files

📝 crates/horizon-client/src/game/remote.rs (+13 -6)
📝 crates/horizon-client/src/game/remote_projectiles.rs (+15 -4)
📝 crates/horizon-client/src/game/tnt.rs (+1 -1)
📝 tools/lan_e2e.py (+35 -9)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

Follows #1690 (dropped items and falling blocks, now merged); based on main.

What players see

On a server, in LAN, and in single player on its server thread (the default), primed TNT used to trail the server. It slid towards each position update, so a falling TNT hung behind where it really was and then caught up. Now it falls and bounces smoothly, and the fuse flashes on time.

Vanilla

PrimedTnt keeps Entity's NO_OP interpolation handler, and PrimedTnt.tick runs on the client too. A position packet places it at once (moveOrInterpolateTo snaps). Its own tick then moves it: gravity 0.04, the move with collisions, drag 0.98, and on the ground the (0.7, −0.5, 0.7) bounce. The tick also burns the fuse down, and a client discards the TNT when the fuse runs out (only the server explodes it). This is the same case as items and falling blocks in #1690.

Change

  • game/remote.rs: a move packet snaps a remote TNT to its position. remote_motion gives it the velocity the server sent.
  • game/remote_projectiles.rs: each client tick runs PrimedTnt::tick on remote TNT and drops it when the fuse ends.
  • tools/lan_e2e.py, check falling: the host summons primed TNT with a 34-tick fuse, so it ends in the air. The guest's samples must match the TNT's exact fall from rest for the fuse the server sent: v -= 0.04; y += v; v *= 0.98, within 0.01.

Evidence

python3 tools/lan_e2e.py --check falling, same check, binaries before (#1690's head) and after:

host in-frame host on its server thread
before FAIL: the guest's TNT is 1.989 off its fall FAIL: 1.483 off
after PASS PASS

Runs combining objects, projectiles, blast and falling pass together. The TNT's fuse ends it, so it no longer leaves a TNT behind for the next check.

Self-check

pr_ready (tools/pr_ready.py --base origin/fix/remote-items-fall on the Mac mini, 60 min)

Check Result
Scope ✅ 4 files, +64 −20
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ❌ 252 run, errors=2. The same 2 fail on main on macOS: OracleReuseTests.test_reuses_until_an_input_or_output_changes (fake java exits 127) and ParityRunnerTests.test_report_rejects_sources_changed_during_a_run (/private/var vs /var)
rustfmt ✅
clippy ✅
tests: horizon-client ✅ 1199 passed
doc tests ✅
Parity 29 affected: 28 passed. server_player_targets failed once on step timing (Bob's teleport landed one step later) and passed on a rerun (python3 tools/parity.py server_player_targets: PASS, 185 s)

No label: it's a fix.

🤖 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/1710 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/25/2026 **Status:** ✅ Merged **Merged:** 10/26/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/remote-tnt` --- ### 📝 Commits (5) - [`1fa4697`](https://github.com/horizon-rust/horizon/commit/1fa46979c84c216f3e5c0d10d0704160db705f12) Server clients: primed TNT falls and burns its fuse by itself between updates - [`8d9e1e9`](https://github.com/horizon-rust/horizon/commit/8d9e1e95ac72bd2fde6fb401be414fd93efc069b) Merge remote-tracking branch 'origin/main' into fix/remote-tnt - [`e6b0f92`](https://github.com/horizon-rust/horizon/commit/e6b0f92427ff965d5faf6ecc4ae1984d3ec48b2c) Merge main - [`2a85b6a`](https://github.com/horizon-rust/horizon/commit/2a85b6a4320043fe370d507ee70814e2e0ea80c4) Merge origin/main into fix/remote-tnt - [`55c961b`](https://github.com/horizon-rust/horizon/commit/55c961b889dd97f2e3d40a0c30e0a3a8aaf6eceb) Merge origin/main into fix/remote-tnt ### 📊 Changes **4 files changed** (+64 additions, -20 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/remote.rs` (+13 -6) 📝 `crates/horizon-client/src/game/remote_projectiles.rs` (+15 -4) 📝 `crates/horizon-client/src/game/tnt.rs` (+1 -1) 📝 `tools/lan_e2e.py` (+35 -9) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Follows #1690 (dropped items and falling blocks, now merged); based on `main`. ## What players see On a server, in LAN, and in single player on its server thread (the default), primed TNT used to trail the server. It slid towards each position update, so a falling TNT hung behind where it really was and then caught up. Now it falls and bounces smoothly, and the fuse flashes on time. ## Vanilla `PrimedTnt` keeps `Entity`'s `NO_OP` interpolation handler, and `PrimedTnt.tick` runs on the client too. A position packet places it at once (`moveOrInterpolateTo` snaps). Its own tick then moves it: gravity 0.04, the move with collisions, drag 0.98, and on the ground the (0.7, −0.5, 0.7) bounce. The tick also burns the fuse down, and a client discards the TNT when the fuse runs out (only the server explodes it). This is the same case as items and falling blocks in #1690. ## Change - `game/remote.rs`: a move packet snaps a remote TNT to its position. `remote_motion` gives it the velocity the server sent. - `game/remote_projectiles.rs`: each client tick runs `PrimedTnt::tick` on remote TNT and drops it when the fuse ends. - `tools/lan_e2e.py`, check `falling`: the host summons primed TNT with a 34-tick fuse, so it ends in the air. The guest's samples must match the TNT's exact fall from rest for the fuse the server sent: `v -= 0.04; y += v; v *= 0.98`, within 0.01. ## Evidence `python3 tools/lan_e2e.py --check falling`, same check, binaries before (#1690's head) and after: | | host in-frame | host on its server thread | |---|---|---| | before | FAIL: the guest's TNT is 1.989 off its fall | FAIL: 1.483 off | | after | PASS | PASS | Runs combining `objects`, `projectiles`, `blast` and `falling` pass together. The TNT's fuse ends it, so it no longer leaves a TNT behind for the next check. ## Self-check **pr_ready** (`tools/pr_ready.py --base origin/fix/remote-items-fall` on the Mac mini, 60 min) | Check | Result | | --- | --- | | Scope | ✅ 4 files, +64 −20 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ❌ 252 run, errors=2. The same 2 fail on `main` on macOS: `OracleReuseTests.test_reuses_until_an_input_or_output_changes` (fake `java` exits 127) and `ParityRunnerTests.test_report_rejects_sources_changed_during_a_run` (`/private/var` vs `/var`) | | rustfmt | ✅ | | clippy | ✅ | | tests: horizon-client | ✅ 1199 passed | | doc tests | ✅ | | Parity | 29 affected: 28 passed. `server_player_targets` failed once on step timing (Bob's teleport landed one step later) and passed on a rerun (`python3 tools/parity.py server_player_targets`: PASS, 185 s) | No label: it's a fix. 🤖 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 04:11:34 +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#3705
No description provided.