From 3f1181bab42d47842df9e45176fdc6b2ce5bcefb Mon Sep 17 00:00:00 2001 From: Kacpherek Date: Mon, 26 Oct 2026 22:37:48 +0100 Subject: [PATCH] Play player step sounds while crawling under a low ceiling --- crates/horizon-client/src/game.rs | 7 ++++--- crates/horizon-client/src/game/remote.rs | 3 +-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/horizon-client/src/game.rs b/crates/horizon-client/src/game.rs index 7596ee871..a7bf12ca8 100644 --- a/crates/horizon-client/src/game.rs +++ b/crates/horizon-client/src/game.rs @@ -4519,7 +4519,6 @@ impl Game<'_> { player.dimensions.eye_height }; self.eye += (camera_eye.unwrap_or(eye_height) - self.eye) * 0.5; - let crouching = player.pose == horizon_client::pose::Pose::Crouching; // `ItemStack.hurtAndBreak` for the glide: Unbreaking can save the wear. if glider_wear > 0 && !self.creative @@ -4539,10 +4538,12 @@ impl Game<'_> { MotionEvent::HurtSound(sound) => self.player_hurt_sound(sound, feet), MotionEvent::Emission { state, in_water, .. - } if !crouching => { + } => { let sounds = self.res.facts().get(state).sounds.clone(); // Entity.playStepSound: the block's step sound at 0.15 volume, - // muffled under the swim sound in water. + // muffled under the swim sound in water. Whether it plays is + // Player.getMovementEmission's call (shift on the ground), + // not the pose: a forced crouch still steps. let (volume, pitch) = if in_water { (sounds.volume * 0.05, sounds.pitch * 0.8) } else { diff --git a/crates/horizon-client/src/game/remote.rs b/crates/horizon-client/src/game/remote.rs index 945af4585..7e566319f 100644 --- a/crates/horizon-client/src/game/remote.rs +++ b/crates/horizon-client/src/game/remote.rs @@ -3305,13 +3305,12 @@ impl Game<'_> { let events = std::mem::take(&mut player.events); self.previous_eye = self.eye; self.eye += (player.dimensions.eye_height - self.eye) * 0.5; - let crouching = player.pose == horizon_client::pose::Pose::Crouching; let feet = [player.position.x, player.position.y, player.position.z]; for event in events { match event { horizon_client::motion::MotionEvent::Emission { state, in_water, .. - } if !crouching => { + } => { let sounds = self.res.facts().get(state).sounds.clone(); // Player.playStepSound: muffled under the swim sound in water. let (volume, pitch) = if in_water {