summaryrefslogtreecommitdiffstats
path: root/src/ClientHandle.cpp
diff options
context:
space:
mode:
authorMat <mail@mathias.is>2019-12-30 00:54:37 +0100
committerGitHub <noreply@github.com>2019-12-30 00:54:37 +0100
commit5074527d2c5beb9a022f58468071434fbf7fb694 (patch)
tree9dfee4e7f6c68e573b15817b3265fa9f19e70441 /src/ClientHandle.cpp
parentCMake: Fix builds in folders with spaces (diff)
downloadcuberite-5074527d2c5beb9a022f58468071434fbf7fb694.tar
cuberite-5074527d2c5beb9a022f58468071434fbf7fb694.tar.gz
cuberite-5074527d2c5beb9a022f58468071434fbf7fb694.tar.bz2
cuberite-5074527d2c5beb9a022f58468071434fbf7fb694.tar.lz
cuberite-5074527d2c5beb9a022f58468071434fbf7fb694.tar.xz
cuberite-5074527d2c5beb9a022f58468071434fbf7fb694.tar.zst
cuberite-5074527d2c5beb9a022f58468071434fbf7fb694.zip
Diffstat (limited to 'src/ClientHandle.cpp')
-rw-r--r--src/ClientHandle.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp
index 16f323cc3..b2e8c893f 100644
--- a/src/ClientHandle.cpp
+++ b/src/ClientHandle.cpp
@@ -1452,8 +1452,8 @@ void cClientHandle::HandleRightClick(int a_BlockX, int a_BlockY, int a_BlockZ, e
World->GetBlockTypeMeta(a_BlockX, a_BlockY, a_BlockZ, BlockType, BlockMeta);
cBlockHandler * BlockHandler = cBlockInfo::GetHandler(BlockType);
- bool Placeable = ItemHandler->IsPlaceable() && !m_Player->IsGameModeSpectator();
- bool BlockUsable = BlockHandler->IsUseable() && (!m_Player->IsGameModeSpectator() || cBlockInfo::IsUseableBySpectator(BlockType));
+ bool Placeable = ItemHandler->IsPlaceable() && !m_Player->IsGameModeAdventure() && !m_Player->IsGameModeSpectator();
+ bool BlockUsable = BlockHandler->IsUseable() && !m_Player->IsGameModeAdventure() && (!m_Player->IsGameModeSpectator() || cBlockInfo::IsUseableBySpectator(BlockType));
if (BlockUsable && !(m_Player->IsCrouched() && !HeldItem.IsEmpty()))
{