summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-08-11 14:24:36 +0200
committerHowaner <franzi.moos@googlemail.com>2014-08-11 14:24:36 +0200
commit202a0d1c1d6de6cc1b229026d0304a736a1d9b75 (patch)
tree1e47a21eef87afad5c365b75b1c2e3d72cee9671
parentMerge pull request #1310 from mc-server/ChestFix (diff)
downloadcuberite-202a0d1c1d6de6cc1b229026d0304a736a1d9b75.tar
cuberite-202a0d1c1d6de6cc1b229026d0304a736a1d9b75.tar.gz
cuberite-202a0d1c1d6de6cc1b229026d0304a736a1d9b75.tar.bz2
cuberite-202a0d1c1d6de6cc1b229026d0304a736a1d9b75.tar.lz
cuberite-202a0d1c1d6de6cc1b229026d0304a736a1d9b75.tar.xz
cuberite-202a0d1c1d6de6cc1b229026d0304a736a1d9b75.tar.zst
cuberite-202a0d1c1d6de6cc1b229026d0304a736a1d9b75.zip
-rw-r--r--src/ClientHandle.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp
index 3e046f38d..8eff45cf4 100644
--- a/src/ClientHandle.cpp
+++ b/src/ClientHandle.cpp
@@ -920,9 +920,13 @@ void cClientHandle::HandleLeftClick(int a_BlockX, int a_BlockY, int a_BlockZ, eB
)
{
m_Player->GetWorld()->SendBlockTo(a_BlockX, a_BlockY, a_BlockZ, m_Player);
- if (cBlockInfo::GetHandler(m_Player->GetWorld()->GetBlock(a_BlockX, a_BlockY + 1, a_BlockZ))->IsClickedThrough())
+ if (a_BlockFace != BLOCK_FACE_NONE)
{
- m_Player->GetWorld()->SendBlockTo(a_BlockX, a_BlockY + 1, a_BlockZ, m_Player);
+ AddFaceDirection(a_BlockX, a_BlockY, a_BlockZ, a_BlockFace);
+ if (cBlockInfo::GetHandler(m_Player->GetWorld()->GetBlock(a_BlockX, a_BlockY, a_BlockZ))->IsClickedThrough())
+ {
+ m_Player->GetWorld()->SendBlockTo(a_BlockX, a_BlockY, a_BlockZ, m_Player);
+ }
}
return;
}
@@ -932,9 +936,13 @@ void cClientHandle::HandleLeftClick(int a_BlockX, int a_BlockY, int a_BlockZ, eB
{
// A plugin doesn't agree with the action, replace the block on the client and quit:
m_Player->GetWorld()->SendBlockTo(a_BlockX, a_BlockY, a_BlockZ, m_Player);
- if (cBlockInfo::GetHandler(m_Player->GetWorld()->GetBlock(a_BlockX, a_BlockY + 1, a_BlockZ))->IsClickedThrough())
+ if (a_BlockFace != BLOCK_FACE_NONE)
{
- m_Player->GetWorld()->SendBlockTo(a_BlockX, a_BlockY + 1, a_BlockZ, m_Player);
+ AddFaceDirection(a_BlockX, a_BlockY, a_BlockZ, a_BlockFace);
+ if (cBlockInfo::GetHandler(m_Player->GetWorld()->GetBlock(a_BlockX, a_BlockY, a_BlockZ))->IsClickedThrough())
+ {
+ m_Player->GetWorld()->SendBlockTo(a_BlockX, a_BlockY, a_BlockZ, m_Player);
+ }
}
return;
}