summaryrefslogtreecommitdiffstats
path: root/src/UI
diff options
context:
space:
mode:
authorMike Hunsinger <mike.hunsinger@gmail.com>2014-01-24 03:54:00 +0100
committerMike Hunsinger <mike.hunsinger@gmail.com>2014-01-24 03:54:00 +0100
commit11948b1d4b98e0147217eef2928a2391c2d8e958 (patch)
tree1d9e526f979f9e15e09331e688a740abae7c1a2d /src/UI
parentRemoved extra line (diff)
downloadcuberite-11948b1d4b98e0147217eef2928a2391c2d8e958.tar
cuberite-11948b1d4b98e0147217eef2928a2391c2d8e958.tar.gz
cuberite-11948b1d4b98e0147217eef2928a2391c2d8e958.tar.bz2
cuberite-11948b1d4b98e0147217eef2928a2391c2d8e958.tar.lz
cuberite-11948b1d4b98e0147217eef2928a2391c2d8e958.tar.xz
cuberite-11948b1d4b98e0147217eef2928a2391c2d8e958.tar.zst
cuberite-11948b1d4b98e0147217eef2928a2391c2d8e958.zip
Diffstat (limited to 'src/UI')
-rw-r--r--src/UI/Window.cpp22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/UI/Window.cpp b/src/UI/Window.cpp
index 3d23dfd07..4261a58d9 100644
--- a/src/UI/Window.cpp
+++ b/src/UI/Window.cpp
@@ -171,7 +171,6 @@ void cWindow::Clicked(
)
{
cPluginManager * PlgMgr = cRoot::Get()->GetPluginManager();
-
if (a_WindowID != m_WindowID)
{
LOGWARNING("%s: Wrong window ID (exp %d, got %d) received from \"%s\"; ignoring click.", __FUNCTION__, m_WindowID, a_WindowID, a_Player.GetName().c_str());
@@ -182,16 +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_Player.TossPickup(a_ClickedItem);
- }
+ if (a_Player.IsGameModeCreative())
+ {
+ a_Player.TossPickup(a_ClickedItem);
+ }
// Toss one of the dragged items:
a_Player.TossHeldItem();
@@ -205,10 +203,10 @@ void cWindow::Clicked(
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);
@@ -288,7 +286,7 @@ bool cWindow::ClosedByPlayer(cPlayer & a_Player, bool a_CanRefuse)
if (a_Player.IsDraggingItem())
{
LOGD("Player holds item! Dropping it...");
- a_Player.TossHeldItem(a_Player.GetDraggingItem().m_ItemCount);
+ a_Player.TossHeldItem(a_Player.GetDraggingItem().m_ItemCount);
}
cClientHandle * ClientHandle = a_Player.GetClientHandle();