summaryrefslogtreecommitdiffstats
path: root/src/UI
diff options
context:
space:
mode:
authorMike Hunsinger <mike.hunsinger@gmail.com>2014-01-24 04:11:10 +0100
committerMike Hunsinger <mike.hunsinger@gmail.com>2014-01-24 04:11:10 +0100
commit7c12247263502030fbf50fc6fda12bb8f67a269b (patch)
tree31c00f22652af0a777c7c88a3e75e57a8adecd5c /src/UI
parentFixed indentation and doxygen comments... For real this time. (diff)
downloadcuberite-7c12247263502030fbf50fc6fda12bb8f67a269b.tar
cuberite-7c12247263502030fbf50fc6fda12bb8f67a269b.tar.gz
cuberite-7c12247263502030fbf50fc6fda12bb8f67a269b.tar.bz2
cuberite-7c12247263502030fbf50fc6fda12bb8f67a269b.tar.lz
cuberite-7c12247263502030fbf50fc6fda12bb8f67a269b.tar.xz
cuberite-7c12247263502030fbf50fc6fda12bb8f67a269b.tar.zst
cuberite-7c12247263502030fbf50fc6fda12bb8f67a269b.zip
Diffstat (limited to 'src/UI')
-rw-r--r--src/UI/Window.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/UI/Window.cpp b/src/UI/Window.cpp
index dd058b304..1a8456f70 100644
--- a/src/UI/Window.cpp
+++ b/src/UI/Window.cpp
@@ -181,15 +181,15 @@ void cWindow::Clicked(
{
case caRightClickOutside:
{
- if (PlgMgr->CallHookPlayerTossingItem(a_Player))
+ if (PlgMgr->CallHookPlayerTossingItem(a_Player))
+ {
+ // A plugin doesn't agree with the tossing. The plugin itself is responsible for handling the consequences (possible inventory mismatch)
+ return;
+ }
+ if (a_Player.IsGameModeCreative())
{
- // A plugin doesn't agree with the tossing. The plugin itself is responsible for handling the consequences (possible inventory mismatch)
- return;
+ a_Player.TossPickup(a_ClickedItem);
}
- if (a_Player.IsGameModeCreative())
- {
- a_Player.TossPickup(a_ClickedItem);
- }
// Toss one of the dragged items:
a_Player.TossHeldItem();
@@ -199,14 +199,14 @@ void cWindow::Clicked(
{
if (PlgMgr->CallHookPlayerTossingItem(a_Player))
{
- // A plugin doesn't agree with the tossing. The plugin itself is responsible for handling the consequences (possible inventory mismatch)
- return;
+ // A plugin doesn't agree with the tossing. The plugin itself is responsible for handling the consequences (possible inventory mismatch)
+ return;
}
- if (a_Player.IsGameModeCreative())
- {
- a_Player.TossPickup(a_ClickedItem);
- }
+ if (a_Player.IsGameModeCreative())
+ {
+ a_Player.TossPickup(a_ClickedItem);
+ }
// Toss all dragged items:
a_Player.TossHeldItem(a_Player.GetDraggingItem().m_ItemCount);
@@ -285,8 +285,8 @@ bool cWindow::ClosedByPlayer(cPlayer & a_Player, bool a_CanRefuse)
// Checks whether the player is still holding an item
if (a_Player.IsDraggingItem())
{
- LOGD("Player holds item! Dropping it...");
- a_Player.TossHeldItem(a_Player.GetDraggingItem().m_ItemCount);
+ LOGD("Player holds item! Dropping it...");
+ a_Player.TossHeldItem(a_Player.GetDraggingItem().m_ItemCount);
}
cClientHandle * ClientHandle = a_Player.GetClientHandle();