summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-06-18 22:15:29 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-06-18 22:15:29 +0200
commit73fb71e1649467d86ab202daa5cd3b12b37dffa5 (patch)
tree16e6a3ec87a9b67b9b32781c28243ddfb498a870
parentAdded a crude limiter for explosions sent to client. (diff)
downloadcuberite-73fb71e1649467d86ab202daa5cd3b12b37dffa5.tar
cuberite-73fb71e1649467d86ab202daa5cd3b12b37dffa5.tar.gz
cuberite-73fb71e1649467d86ab202daa5cd3b12b37dffa5.tar.bz2
cuberite-73fb71e1649467d86ab202daa5cd3b12b37dffa5.tar.lz
cuberite-73fb71e1649467d86ab202daa5cd3b12b37dffa5.tar.xz
cuberite-73fb71e1649467d86ab202daa5cd3b12b37dffa5.tar.zst
cuberite-73fb71e1649467d86ab202daa5cd3b12b37dffa5.zip
-rw-r--r--source/ClientHandle.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/ClientHandle.cpp b/source/ClientHandle.cpp
index 4831c5512..23a34d7bc 100644
--- a/source/ClientHandle.cpp
+++ b/source/ClientHandle.cpp
@@ -769,7 +769,7 @@ void cClientHandle::HandleRightClick(int a_BlockX, int a_BlockY, int a_BlockZ, c
World->GetBlockTypeMeta(a_BlockX, a_BlockY, a_BlockZ, BlockType, BlockMeta);
cBlockHandler * Handler = cBlockHandler::GetBlockHandler(BlockType);
- if (Handler->IsUseable())
+ if (Handler->IsUseable() && !m_Player->IsCrouched())
{
if (PlgMgr->CallHookPlayerUsingBlock(*m_Player, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ, BlockType, BlockMeta))
{
@@ -783,7 +783,7 @@ void cClientHandle::HandleRightClick(int a_BlockX, int a_BlockY, int a_BlockZ, c
cItemHandler * ItemHandler = cItemHandler::GetItemHandler(Equipped.m_ItemType);
- if (ItemHandler->IsPlaceable())
+ if (ItemHandler->IsPlaceable() || m_Player->IsCrouched())
{
HandlePlaceBlock(a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ, *ItemHandler);
}