summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-10-06 22:53:08 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-10-06 22:53:08 +0200
commit4f34704ce8b712bdb4c6fb05bfc2d70e769eb08d (patch)
tree0fefa95acc8082b50dc5aac5df5e66eb272fa79b /source
parentRemoved redstone from settings.ini, added a note about wiki and webadmin (diff)
downloadcuberite-4f34704ce8b712bdb4c6fb05bfc2d70e769eb08d.tar
cuberite-4f34704ce8b712bdb4c6fb05bfc2d70e769eb08d.tar.gz
cuberite-4f34704ce8b712bdb4c6fb05bfc2d70e769eb08d.tar.bz2
cuberite-4f34704ce8b712bdb4c6fb05bfc2d70e769eb08d.tar.lz
cuberite-4f34704ce8b712bdb4c6fb05bfc2d70e769eb08d.tar.xz
cuberite-4f34704ce8b712bdb4c6fb05bfc2d70e769eb08d.tar.zst
cuberite-4f34704ce8b712bdb4c6fb05bfc2d70e769eb08d.zip
Diffstat (limited to '')
-rw-r--r--source/ClientHandle.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/source/ClientHandle.cpp b/source/ClientHandle.cpp
index ad9401e79..f019fd862 100644
--- a/source/ClientHandle.cpp
+++ b/source/ClientHandle.cpp
@@ -571,15 +571,18 @@ void cClientHandle::HandleBlockDig(int a_BlockX, int a_BlockY, int a_BlockZ, cha
ItemHandler->OnDiggingBlock(World, m_Player, &Equipped, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace);
// Check for clickthrough-blocks:
- int pX = a_BlockX;
- int pY = a_BlockY;
- int pZ = a_BlockZ;
- AddDirection(pX, pY, pZ, a_BlockFace);
-
- Handler = cBlockHandler::GetBlockHandler(World->GetBlock(pX, pY, pZ));
- if (Handler->IsClickedThrough())
+ if (a_BlockFace != BLOCK_FACE_NONE)
{
- Handler->OnDigging(World, m_Player, pX, pY, pZ);
+ int pX = a_BlockX;
+ int pY = a_BlockY;
+ int pZ = a_BlockZ;
+ AddDirection(pX, pY, pZ, a_BlockFace);
+
+ Handler = cBlockHandler::GetBlockHandler(World->GetBlock(pX, pY, pZ));
+ if (Handler->IsClickedThrough())
+ {
+ Handler->OnDigging(World, m_Player, pX, pY, pZ);
+ }
}
}
}