aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJude Melton-Houghton <jwmhjwmh@gmail.com>2022-12-10 09:08:50 -0500
committerGitHub <noreply@github.com>2022-12-10 09:08:50 -0500
commitc18c08205995395e3db0a1a05167cd6f018947ee (patch)
treeec304d0912897fe8f824a5c676c7f2174147e62b
parent1798ad0ec4deed12e7a3f20e8278171e304a087d (diff)
downloadminetest-c18c08205995395e3db0a1a05167cd6f018947ee.tar.xz
Prevent air acceleration with 0 jump speed (#13036)
-rw-r--r--src/client/localplayer.cpp3
1 files changed, 3 insertions, 0 deletions
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);
}