From 73fb71e1649467d86ab202daa5cd3b12b37dffa5 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Tue, 18 Jun 2013 20:15:29 +0000 Subject: Crouching will allow block placement on otherwise functional blocks. Fixes FS #382 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1607 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/ClientHandle.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/ClientHandle.cpp') 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); } -- cgit v1.2.3