summaryrefslogtreecommitdiffstats
path: root/src/UI/Window.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-07-09 23:27:02 +0200
committerMattes D <github@xoft.cz>2014-07-09 23:27:02 +0200
commitea24a4f4aa575fdba52c8f3dfc1f12739f809793 (patch)
tree677579acdca175665f7a635dc9f960115bfc9815 /src/UI/Window.cpp
parentFixed bow charge (diff)
parentRemoved unused include line. (diff)
downloadcuberite-ea24a4f4aa575fdba52c8f3dfc1f12739f809793.tar
cuberite-ea24a4f4aa575fdba52c8f3dfc1f12739f809793.tar.gz
cuberite-ea24a4f4aa575fdba52c8f3dfc1f12739f809793.tar.bz2
cuberite-ea24a4f4aa575fdba52c8f3dfc1f12739f809793.tar.lz
cuberite-ea24a4f4aa575fdba52c8f3dfc1f12739f809793.tar.xz
cuberite-ea24a4f4aa575fdba52c8f3dfc1f12739f809793.tar.zst
cuberite-ea24a4f4aa575fdba52c8f3dfc1f12739f809793.zip
Diffstat (limited to '')
-rw-r--r--src/UI/Window.cpp22
1 files changed, 7 insertions, 15 deletions
diff --git a/src/UI/Window.cpp b/src/UI/Window.cpp
index 381c6e121..ebdc1aea8 100644
--- a/src/UI/Window.cpp
+++ b/src/UI/Window.cpp
@@ -178,6 +178,7 @@ void cWindow::Clicked(
switch (a_ClickAction)
{
+ case caLeftClickOutside:
case caRightClickOutside:
{
if (PlgMgr->CallHookPlayerTossingItem(a_Player))
@@ -190,25 +191,16 @@ void cWindow::Clicked(
a_Player.TossPickup(a_ClickedItem);
}
- // Toss one of the dragged items:
- a_Player.TossHeldItem();
- return;
- }
- case caLeftClickOutside:
- {
- if (PlgMgr->CallHookPlayerTossingItem(a_Player))
+ if (a_ClickAction == caLeftClickOutside)
{
- // A plugin doesn't agree with the tossing. The plugin itself is responsible for handling the consequences (possible inventory mismatch)
- return;
+ // Toss all dragged items:
+ a_Player.TossHeldItem(a_Player.GetDraggingItem().m_ItemCount);
}
-
- if (a_Player.IsGameModeCreative())
+ else
{
- a_Player.TossPickup(a_ClickedItem);
+ // Toss one of the dragged items:
+ a_Player.TossHeldItem();
}
-
- // Toss all dragged items:
- a_Player.TossHeldItem(a_Player.GetDraggingItem().m_ItemCount);
return;
}
case caLeftClickOutsideHoldNothing: