diff options
| author | DFelipeh <thediogopcm@gmail.com> | 2026-03-02 10:51:06 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-02 17:51:06 +0700 |
| commit | bab9b563de72344180ddc73009b18c01fe44cac1 (patch) | |
| tree | 873b1960f6a22ac2fdee2129284b6eb6d0a93ddb /Minecraft.Client/Input.cpp | |
| parent | 82c4a50ba0c721c6c98e1def6e16610057b08a2f (diff) | |
fix being able to walk, jump and sneak on inventory, crafting, anvil, chest screens (#122)
Diffstat (limited to 'Minecraft.Client/Input.cpp')
| -rw-r--r-- | Minecraft.Client/Input.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Minecraft.Client/Input.cpp b/Minecraft.Client/Input.cpp index c1a3bb31..716f4dfd 100644 --- a/Minecraft.Client/Input.cpp +++ b/Minecraft.Client/Input.cpp @@ -47,7 +47,7 @@ void Input::tick(LocalPlayer *player) #ifdef _WINDOWS64 // WASD movement (combine with gamepad) - if (iPad == 0) + if (iPad == 0 && KMInput.IsCaptured()) { float kbX = 0.0f, kbY = 0.0f; if (KMInput.IsKeyDown('W')) { kbY += 1.0f; sprintForward += 1.0f; usingKeyboardMovement = true; } @@ -95,7 +95,7 @@ void Input::tick(LocalPlayer *player) #ifdef _WINDOWS64 // Keyboard hold-to-sneak (overrides gamepad toggle) - if (iPad == 0 && KMInput.IsKeyDown(VK_SHIFT) && !player->abilities.flying) + if (iPad == 0 && KMInput.IsCaptured() && KMInput.IsKeyDown(VK_SHIFT) && !player->abilities.flying) sneaking = true; #endif @@ -166,7 +166,7 @@ void Input::tick(LocalPlayer *player) #ifdef _WINDOWS64 // Keyboard jump (Space) - if (iPad == 0 && KMInput.IsKeyDown(VK_SPACE) && pMinecraft->localgameModes[iPad]->isInputAllowed(MINECRAFT_ACTION_JUMP)) + if (iPad == 0 && KMInput.IsCaptured() && KMInput.IsKeyDown(VK_SPACE) && pMinecraft->localgameModes[iPad]->isInputAllowed(MINECRAFT_ACTION_JUMP)) jumping = true; #endif |
