mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Restore pass-through of direction keys (#11924)
This moves relevant code into the PlayerControl class and gets rid of separate keyPressed variable.
This commit is contained in:
parent
76dbd0d2d0
commit
5eb45e1ea0
11 changed files with 165 additions and 98 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue