diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-08-14 11:45:38 +0200 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-08-14 11:45:38 +0200 |
commit | da23911dbc37e88139d0798e21fe04a1d305af52 (patch) | |
tree | 7afe06bab459cb23b31c291d824597d2e8c892a7 /source/cSurvivalInventory.cpp | |
parent | Added a few more stackable items (diff) | |
download | cuberite-da23911dbc37e88139d0798e21fe04a1d305af52.tar cuberite-da23911dbc37e88139d0798e21fe04a1d305af52.tar.gz cuberite-da23911dbc37e88139d0798e21fe04a1d305af52.tar.bz2 cuberite-da23911dbc37e88139d0798e21fe04a1d305af52.tar.lz cuberite-da23911dbc37e88139d0798e21fe04a1d305af52.tar.xz cuberite-da23911dbc37e88139d0798e21fe04a1d305af52.tar.zst cuberite-da23911dbc37e88139d0798e21fe04a1d305af52.zip |
Diffstat (limited to 'source/cSurvivalInventory.cpp')
-rw-r--r-- | source/cSurvivalInventory.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/cSurvivalInventory.cpp b/source/cSurvivalInventory.cpp index 50c750100..887868fd7 100644 --- a/source/cSurvivalInventory.cpp +++ b/source/cSurvivalInventory.cpp @@ -201,7 +201,14 @@ void cSurvivalInventory::ShiftClickedCraftingGrid(short a_Slot) { return; } + // First try the main inventory: Item->m_ItemCount -= MoveItem(Item->m_ItemID, Item->m_ItemHealth, Item->m_ItemCount, SLOT_INVENTORY_MIN, SLOT_INVENTORY_MAX); + + // If anything left, try the hotbar: + if (Item->m_ItemCount > 0) + { + Item->m_ItemCount -= MoveItem(Item->m_ItemID, Item->m_ItemHealth, Item->m_ItemCount, SLOT_HOTBAR_MIN, SLOT_HOTBAR_MAX); + } SendSlot(a_Slot); } |