summaryrefslogtreecommitdiff
path: root/src/client/game.cpp
diff options
context:
space:
mode:
authorVanessa Dannenberg <vanessa.e.dannenberg@gmail.com>2018-12-02 17:34:29 -0500
committersfan5 <sfan5@live.de>2018-12-02 23:34:29 +0100
commit1b0fd195c614ffa1b04d687e7793fb5bb266c535 (patch)
tree0cfa304027f325b7bd4609adf6325e4b0b592c77 /src/client/game.cpp
parent42166fff7454aad64dfcd60a38bb5fcb75499243 (diff)
downloadminetest-1b0fd195c614ffa1b04d687e7793fb5bb266c535.tar.gz
minetest-1b0fd195c614ffa1b04d687e7793fb5bb266c535.tar.bz2
minetest-1b0fd195c614ffa1b04d687e7793fb5bb266c535.zip
Raise hotbar limit to 32 slots, add associated keybinding options (#7916)
add associated keybinding options update docs and settingtypes
Diffstat (limited to 'src/client/game.cpp')
-rw-r--r--src/client/game.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/client/game.cpp b/src/client/game.cpp
index 418b412fa..bad29aa76 100644
--- a/src/client/game.cpp
+++ b/src/client/game.cpp
@@ -68,6 +68,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "irrlicht_changes/static_text.h"
#include "version.h"
#include "script/scripting_client.h"
+#include "hud.h"
#if USE_SOUND
#include "client/sound_openal.h"
@@ -2004,12 +2005,10 @@ void Game::processItemSelection(u16 *new_playeritem)
/* Item selection using hotbar slot keys
*/
- for (u16 i = 0; i < 23; i++) {
+ for (u16 i = 0; i <= max_item; i++) {
if (wasKeyDown((GameKeyType) (KeyType::SLOT_1 + i))) {
- if (i < PLAYER_INVENTORY_SIZE && i < player->hud_hotbar_itemcount) {
- *new_playeritem = i;
- infostream << "Selected item: " << new_playeritem << std::endl;
- }
+ *new_playeritem = i;
+ infostream << "Selected item: " << new_playeritem << std::endl;
break;
}
}