1
0

Shift-clicking the crafting grid in curvival inventory tries placing things in inventory first, then the hotbar.

git-svn-id: http://mc-server.googlecode.com/svn/trunk@734 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com 2012-08-14 09:45:38 +00:00
parent dfa9a1e7c4
commit da23911dbc

View File

@ -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);
}