[PR #4268] [MERGED] Let a sneaking player descend through scaffolding on the server #5530

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

📋 Pull Request Information

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

Base: main ← Head: fix/issue-4254-scaffolding-sneak-descend


📝 Commits (2)

  • 9ca7f51 Sneaking players descend through scaffolding on the server (#4254)
  • 470fb25 Merge main into fix/issue-4254-scaffolding-sneak-descend

📊 Changes

2 files changed (+19 additions, -2 deletions)

View changed files

📝 crates/horizon-client/src/lan/hub.rs (+12 -2)
📝 crates/horizon-world/src/collision_context.rs (+7 -0)

📄 Description

🤖 Opened by DUzzL's AI agent, not by DUzzL personally.

Fixes #4254

Cause: the client passes sneak as descending (motion.rs), so scaffolding lets a sneaking player down. The server's collide() in lan/hub.rs built its collision context with CollisionContext::position(y) (descending = false) for both the move and the new-collision check. Scaffolding kept its solid shape, so the server rejected the move and sent the player back.

Change: with_descending() in collision_context.rs. Both hub.rs calls pass g.sneaking. In a position-only context only scaffolding reads the flag (powder snow returns empty without an entity), so no other block changes.

Tested: cargo fmt --check and cargo clippy -p horizon-world -p horizon-client --all-targets -- -D warnings pass. cargo test -p horizon-world collision (1 matching test, passed) and cargo test -p horizon-client --lib lan (79 passed, 5 ignored) pass. No regression test was added.

Not tested: no in-game or live-server run. A powder-snow mismatch between client and server (client uses a living-entity context, server a position context) already existed and is not changed. tools/pr_ready.py not run.


🔄 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/4268 **Author:** [@DUzzL](https://github.com/DUzzL) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@rdbtCVS](https://github.com/rdbtCVS) **Base:** `main` ← **Head:** `fix/issue-4254-scaffolding-sneak-descend` --- ### 📝 Commits (2) - [`9ca7f51`](https://github.com/horizon-rust/horizon/commit/9ca7f51d050c098349c6f8358cf749f19caf8544) Sneaking players descend through scaffolding on the server (#4254) - [`470fb25`](https://github.com/horizon-rust/horizon/commit/470fb25a891bb08b240104f0da55cff9b942caf2) Merge main into fix/issue-4254-scaffolding-sneak-descend ### 📊 Changes **2 files changed** (+19 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/lan/hub.rs` (+12 -2) 📝 `crates/horizon-world/src/collision_context.rs` (+7 -0) </details> ### 📄 Description > 🤖 Opened by DUzzL's AI agent, not by DUzzL personally. Fixes #4254 **Cause:** the client passes sneak as `descending` (`motion.rs`), so scaffolding lets a sneaking player down. The server's `collide()` in `lan/hub.rs` built its collision context with `CollisionContext::position(y)` (descending = false) for both the move and the new-collision check. Scaffolding kept its solid shape, so the server rejected the move and sent the player back. **Change:** `with_descending()` in `collision_context.rs`. Both `hub.rs` calls pass `g.sneaking`. In a position-only context only scaffolding reads the flag (powder snow returns empty without an entity), so no other block changes. **Tested:** `cargo fmt --check` and `cargo clippy -p horizon-world -p horizon-client --all-targets -- -D warnings` pass. `cargo test -p horizon-world collision` (1 matching test, passed) and `cargo test -p horizon-client --lib lan` (79 passed, 5 ignored) pass. No regression test was added. **Not tested:** no in-game or live-server run. A powder-snow mismatch between client and server (client uses a living-entity context, server a position context) already existed and is not changed. `tools/pr_ready.py` not run. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:13:14 +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#5530
No description provided.