Skip to content

Commit

Permalink
Fix regression: mouse wheel couldn't scroll from last hotbar item to …
Browse files Browse the repository at this point in the history
…first
  • Loading branch information
kahrl committed Nov 2, 2014
1 parent 43bf432 commit 817e3a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/game.cpp
Expand Up @@ -2402,7 +2402,7 @@ void MinetestApp::processItemSelection(u16 *new_playeritem)
player->hud_hotbar_itemcount - 1);

if (wheel < 0)
*new_playeritem = *new_playeritem < max_item ? *new_playeritem + 1 : max_item;
*new_playeritem = *new_playeritem < max_item ? *new_playeritem + 1 : 0;
else if (wheel > 0)
*new_playeritem = *new_playeritem > 0 ? *new_playeritem - 1 : max_item;
// else wheel == 0
Expand Down

0 comments on commit 817e3a6

Please sign in to comment.