diff options
author | Howaner <franzi.moos@googlemail.com> | 2014-06-01 00:43:09 +0200 |
---|---|---|
committer | Howaner <franzi.moos@googlemail.com> | 2014-06-01 00:43:09 +0200 |
commit | a18b6c231102c78604b9ada7e6ce8a4eb074591e (patch) | |
tree | 22845f04d67acece14ffb86f367b660ebad915bb /src/UI | |
parent | Missing return; (diff) | |
download | cuberite-a18b6c231102c78604b9ada7e6ce8a4eb074591e.tar cuberite-a18b6c231102c78604b9ada7e6ce8a4eb074591e.tar.gz cuberite-a18b6c231102c78604b9ada7e6ce8a4eb074591e.tar.bz2 cuberite-a18b6c231102c78604b9ada7e6ce8a4eb074591e.tar.lz cuberite-a18b6c231102c78604b9ada7e6ce8a4eb074591e.tar.xz cuberite-a18b6c231102c78604b9ada7e6ce8a4eb074591e.tar.zst cuberite-a18b6c231102c78604b9ada7e6ce8a4eb074591e.zip |
Diffstat (limited to '')
-rw-r--r-- | src/UI/SlotArea.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/UI/SlotArea.cpp b/src/UI/SlotArea.cpp index bc8dd9cd6..ac85322b3 100644 --- a/src/UI/SlotArea.cpp +++ b/src/UI/SlotArea.cpp @@ -1397,12 +1397,6 @@ void cSlotAreaFurnace::Clicked(cPlayer & a_Player, int a_SlotNum, eClickAction a return; } - if ((a_ClickAction == caShiftLeftClick) || (a_ClickAction == caShiftRightClick)) - { - ShiftClicked(a_Player, a_SlotNum, a_ClickedItem); - return; - } - cItem Slot(*GetSlot(a_SlotNum, a_Player)); if (!Slot.IsSameType(a_ClickedItem)) { @@ -1411,8 +1405,15 @@ void cSlotAreaFurnace::Clicked(cPlayer & a_Player, int a_SlotNum, eClickAction a LOGWARNING("Their item: %s", ItemToFullString(a_ClickedItem).c_str()); bAsync = true; } - cItem & DraggingItem = a_Player.GetDraggingItem(); + if ((a_ClickAction == caShiftLeftClick) || (a_ClickAction == caShiftRightClick)) + { + HandleSmeltItem(Slot, a_Player); + ShiftClicked(a_Player, a_SlotNum, Slot); + return; + } + + cItem & DraggingItem = a_Player.GetDraggingItem(); if (!DraggingItem.IsEmpty()) { if (a_ClickAction == caDblClick) @@ -1429,6 +1430,7 @@ void cSlotAreaFurnace::Clicked(cPlayer & a_Player, int a_SlotNum, eClickAction a } DraggingItem.m_ItemCount += Slot.m_ItemCount; + HandleSmeltItem(Slot, a_Player); Slot.Empty(); } else @@ -1443,6 +1445,7 @@ void cSlotAreaFurnace::Clicked(cPlayer & a_Player, int a_SlotNum, eClickAction a case caLeftClick: { DraggingItem = Slot; + HandleSmeltItem(Slot, a_Player); Slot.Empty(); break; } @@ -1456,6 +1459,7 @@ void cSlotAreaFurnace::Clicked(cPlayer & a_Player, int a_SlotNum, eClickAction a { Slot.Empty(); } + HandleSmeltItem(DraggingItem, a_Player); break; } default: |