mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-05-01 03:20:47 +00:00
Add menu display check for sneak toggle in flying mode (#319)
Fixes being able to fly down while a menu is open.
This commit is contained in:
parent
384b9f4445
commit
30ecc80250
|
|
@ -1456,7 +1456,7 @@ void Minecraft::run_middle()
|
|||
if (KMInput.ConsumeKeyPress('C')) localplayers[i]->ullButtonsPressed |= 1LL<<MINECRAFT_ACTION_CRAFTING;
|
||||
if (KMInput.ConsumeKeyPress(VK_F5)) localplayers[i]->ullButtonsPressed |= 1LL<<MINECRAFT_ACTION_RENDER_THIRD_PERSON;
|
||||
// In flying mode, Shift held = sneak/descend
|
||||
if (localplayers[i]->abilities.flying && KMInput.IsKeyDown(VK_SHIFT))
|
||||
if (localplayers[i]->abilities.flying && KMInput.IsKeyDown(VK_SHIFT) && !ui.GetMenuDisplayed(i))
|
||||
localplayers[i]->ullButtonsPressed |= 1LL<<MINECRAFT_ACTION_SNEAK_TOGGLE;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue