diff options
| author | Marlian <84173858+MCbabel@users.noreply.github.com> | 2026-03-05 14:39:11 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-05 07:39:11 -0600 |
| commit | 9c17f3473a71a8131d975ce5e100d9f043c1b31e (patch) | |
| tree | b5d640c54127b8fbe42f2b7a8fe895c2df0794ce /Minecraft.Client/Input.cpp | |
| parent | a37ebe221c4b1b85fd484fa64d945c92cba4b212 (diff) | |
Fix Ctrl-sprint not working while flying in creative mode (#563)
Remove the !player->abilities.flying guard that was incorrectly added around the Ctrl-sprint block in Input.cpp during the KBM refactor. This prevented Ctrl+W from initiating sprint while flying in creative mode. Sprinting on the ground in both survival and creative worked fine.
The sprint flag now sets correctly whenever Ctrl+W is held, including while flying. LocalPlayer::aiStep() still properly gates setSprinting() with onGround, enoughFoodToSprint, isUsingItem etc.
Fixes smartcmd/MinecraftConsoles#470
Diffstat (limited to 'Minecraft.Client/Input.cpp')
| -rw-r--r-- | Minecraft.Client/Input.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/Minecraft.Client/Input.cpp b/Minecraft.Client/Input.cpp index 4d931d3e..1fd67683 100644 --- a/Minecraft.Client/Input.cpp +++ b/Minecraft.Client/Input.cpp @@ -104,8 +104,7 @@ void Input::tick(LocalPlayer *player) } } - // Ctrl + forward = sprint (hold to sprint) - if (!player->abilities.flying) + // Ctrl + forward = sprint (hold to sprint, including while flying) { bool ctrlHeld = g_KBMInput.IsKeyDown(KeyboardMouseInput::KEY_SPRINT); bool movingForward = (kbYA > 0.0f); @@ -119,10 +118,6 @@ void Input::tick(LocalPlayer *player) sprinting = false; } } - else - { - sprinting = false; - } } else if (iPad == 0) { |
