summaryrefslogtreecommitdiffstats
path: root/source/cSurvivalInventory.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--source/cSurvivalInventory.cpp7
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);
}