[PR #2730] [MERGED] Send a server player's velocity after a mace smash so Wind Burst launches evenly #4573

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

📋 Pull Request Information

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

Base: main ← Head: fix/2714-windburst


📝 Commits (2)

  • 3c85d25 Tell a server player's client about its velocity after a mace smash
  • 5e58242 Merge main into fix/2714-windburst

📊 Changes

2 files changed (+18 additions, -3 deletions)

View changed files

📝 crates/horizon-client/src/game/lan_actions.rs (+15 -3)
📝 crates/horizon-client/src/game/mace.rs (+3 -0)

📄 Description

What and why

On the server thread (the default single player), a Wind Burst mace launched you by a different amount each time, and sometimes not at all.

A smash attack stops the fall by setting the attacker's vertical speed to 0.01. The server did that for its copy of the player only, and the window never heard about it. The window moves by itself, so it kept its fall speed and the Wind Burst's push then just got added to it: a fast fall cancelled most of the launch.

In vanilla MaceItem.hurtEnemy sends the new velocity to the attacker right away (ClientboundSetEntityMotionPacket), before the Wind Burst's explosion push arrives. Now a smash marks the velocity, and the server sends it to the attacking player straight after the hit, before the burst (which is queued until the turn ends) is sent. The clamp to 0.01 and the push then add up the way they do in vanilla, so the launch does not depend on how fast you were falling.

Fixes #2714.

Vanilla reference

  • MaceItem.hurtEnemy (setDeltaMovement with y 0.01, then ClientboundSetEntityMotionPacket)
  • ExplodeEffect.apply and the wind_burst enchantment (post attack, affected attacker)

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/2730 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/27/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/2714-windburst` --- ### 📝 Commits (2) - [`3c85d25`](https://github.com/horizon-rust/horizon/commit/3c85d2558bddad95e736215b5dda428ed2396297) Tell a server player's client about its velocity after a mace smash - [`5e58242`](https://github.com/horizon-rust/horizon/commit/5e582420ed46e7e69ccb910c918e1a8aea38db03) Merge main into fix/2714-windburst ### 📊 Changes **2 files changed** (+18 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/lan_actions.rs` (+15 -3) 📝 `crates/horizon-client/src/game/mace.rs` (+3 -0) </details> ### 📄 Description ## What and why On the server thread (the default single player), a Wind Burst mace launched you by a different amount each time, and sometimes not at all. A smash attack stops the fall by setting the attacker's vertical speed to 0.01. The server did that for its copy of the player only, and the window never heard about it. The window moves by itself, so it kept its fall speed and the Wind Burst's push then just got added to it: a fast fall cancelled most of the launch. In vanilla `MaceItem.hurtEnemy` sends the new velocity to the attacker right away (`ClientboundSetEntityMotionPacket`), before the Wind Burst's explosion push arrives. Now a smash marks the velocity, and the server sends it to the attacking player straight after the hit, before the burst (which is queued until the turn ends) is sent. The clamp to 0.01 and the push then add up the way they do in vanilla, so the launch does not depend on how fast you were falling. Fixes #2714. ## Vanilla reference - `MaceItem.hurtEnemy` (`setDeltaMovement` with y 0.01, then `ClientboundSetEntityMotionPacket`) - `ExplodeEffect.apply` and the `wind_burst` enchantment (post attack, affected attacker) ## 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:18:09 +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#4573
No description provided.