fix: remove juicey's visionary offhand implementation

This commit is contained in:
Tropical 2026-03-10 20:08:01 -05:00
parent c2728cd2d9
commit 9752dec5e7
2 changed files with 3 additions and 3 deletions

View file

@ -40,7 +40,7 @@ static const int s_watchedKeys[] = {
SDL_SCANCODE_TAB, SDL_SCANCODE_LCTRL, SDL_SCANCODE_RCTRL,
SDL_SCANCODE_1, SDL_SCANCODE_2, SDL_SCANCODE_3, SDL_SCANCODE_4,
SDL_SCANCODE_5, SDL_SCANCODE_6, SDL_SCANCODE_7, SDL_SCANCODE_8,
SDL_SCANCODE_9, SDL_SCANCODE_0,
SDL_SCANCODE_9,
};
static const int s_watchedKeyCount = (int)(sizeof(s_watchedKeys) / sizeof(s_watchedKeys[0]));
@ -164,7 +164,7 @@ int C_4JInput::GetHotbarSlotPressed(int iPad) {
static const int sc[10] = {
SDL_SCANCODE_1, SDL_SCANCODE_2, SDL_SCANCODE_3, SDL_SCANCODE_4,
SDL_SCANCODE_5, SDL_SCANCODE_6, SDL_SCANCODE_7, SDL_SCANCODE_8,
SDL_SCANCODE_9, SDL_SCANCODE_0
SDL_SCANCODE_9,
};
static bool s_wasDown[10] = {};

View file

@ -3439,7 +3439,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
#endif
{
int hotbarSlot = InputManager.GetHotbarSlotPressed(iPad);
if (hotbarSlot >= 0 && gameMode->isInputAllowed(MINECRAFT_ACTION_LEFT_SCROLL))
if (hotbarSlot >= 0 && hotbarSlot <= 9)
{
player->inventory->selected = hotbarSlot;
selected = true;