diff options
author | sfan5 <sfan5@live.de> | 2022-01-09 18:46:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-09 18:46:36 +0100 |
commit | 5eb45e1ea03c6104f007efec6dd9c351f310193d (patch) | |
tree | 28a40addf99493aedfbf67e4d85fa6cf88723419 /src/client/localplayer.cpp | |
parent | 76dbd0d2d04712dcad4f7c6afecb97fa8d662d6d (diff) | |
download | minetest-5eb45e1ea03c6104f007efec6dd9c351f310193d.tar.xz |
Restore pass-through of direction keys (#11924)
This moves relevant code into the PlayerControl class and gets rid of separate keyPressed variable.
Diffstat (limited to 'src/client/localplayer.cpp')
-rw-r--r-- | src/client/localplayer.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/client/localplayer.cpp b/src/client/localplayer.cpp index 3f78d201d..4f1ea7bda 100644 --- a/src/client/localplayer.cpp +++ b/src/client/localplayer.cpp @@ -1096,10 +1096,8 @@ void LocalPlayer::handleAutojump(f32 dtime, Environment *env, if (m_autojump) return; - bool control_forward = keyPressed & (1 << 0); - bool could_autojump = - m_can_jump && !control.jump && !control.sneak && control_forward; + m_can_jump && !control.jump && !control.sneak && control.isMoving(); if (!could_autojump) return; |