summaryrefslogtreecommitdiffstats
path: root/src/ClientHandle.cpp
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-08-06 14:04:25 +0200
committerHowaner <franzi.moos@googlemail.com>2014-08-06 14:04:25 +0200
commitff7171fc5a567590dd52d4213439778f0dfcce53 (patch)
treeffa06a69975fd4a87378b89d079fb9fde3a16cb6 /src/ClientHandle.cpp
parentMerge pull request #1289 from mc-server/LuaAPI (diff)
downloadcuberite-ff7171fc5a567590dd52d4213439778f0dfcce53.tar
cuberite-ff7171fc5a567590dd52d4213439778f0dfcce53.tar.gz
cuberite-ff7171fc5a567590dd52d4213439778f0dfcce53.tar.bz2
cuberite-ff7171fc5a567590dd52d4213439778f0dfcce53.tar.lz
cuberite-ff7171fc5a567590dd52d4213439778f0dfcce53.tar.xz
cuberite-ff7171fc5a567590dd52d4213439778f0dfcce53.tar.zst
cuberite-ff7171fc5a567590dd52d4213439778f0dfcce53.zip
Diffstat (limited to 'src/ClientHandle.cpp')
-rw-r--r--src/ClientHandle.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp
index 72257028a..3e046f38d 100644
--- a/src/ClientHandle.cpp
+++ b/src/ClientHandle.cpp
@@ -920,6 +920,10 @@ 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())
+ {
+ m_Player->GetWorld()->SendBlockTo(a_BlockX, a_BlockY + 1, a_BlockZ, m_Player);
+ }
return;
}
@@ -928,6 +932,10 @@ 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())
+ {
+ m_Player->GetWorld()->SendBlockTo(a_BlockX, a_BlockY + 1, a_BlockZ, m_Player);
+ }
return;
}