From c18c08205995395e3db0a1a05167cd6f018947ee Mon Sep 17 00:00:00 2001 From: Jude Melton-Houghton Date: Sat, 10 Dec 2022 09:08:50 -0500 Subject: [PATCH] Prevent air acceleration with 0 jump speed (#13036) --- src/client/localplayer.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/client/localplayer.cpp b/src/client/localplayer.cpp index 48d2d86ee..776ad055a 100644 --- a/src/client/localplayer.cpp +++ b/src/client/localplayer.cpp @@ -485,6 +485,9 @@ void LocalPlayer::move(f32 dtime, Environment *env, f32 pos_max_d, m_can_jump = false; } + // Prevent sliding on the ground when jump speed is 0 + m_can_jump = m_can_jump && jumpspeed != 0.0f; + // Autojump handleAutojump(dtime, env, result, initial_position, initial_speed, pos_max_d); }