summaryrefslogtreecommitdiffstats
path: root/source/ClientHandle.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-02-14 22:47:57 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-02-14 22:47:57 +0100
commit48d30dfca22dee032de523cdf3a0791cebffd3e5 (patch)
tree9a22f159669d7da3049036c59a980a90001f3dc3 /source/ClientHandle.cpp
parentExported forgotten API functions in cPluginManager: ExecuteCommand(), ForceExecuteCommand() (diff)
downloadcuberite-48d30dfca22dee032de523cdf3a0791cebffd3e5.tar
cuberite-48d30dfca22dee032de523cdf3a0791cebffd3e5.tar.gz
cuberite-48d30dfca22dee032de523cdf3a0791cebffd3e5.tar.bz2
cuberite-48d30dfca22dee032de523cdf3a0791cebffd3e5.tar.lz
cuberite-48d30dfca22dee032de523cdf3a0791cebffd3e5.tar.xz
cuberite-48d30dfca22dee032de523cdf3a0791cebffd3e5.tar.zst
cuberite-48d30dfca22dee032de523cdf3a0791cebffd3e5.zip
Diffstat (limited to 'source/ClientHandle.cpp')
-rw-r--r--source/ClientHandle.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/ClientHandle.cpp b/source/ClientHandle.cpp
index efe4f9c9f..0f9958e98 100644
--- a/source/ClientHandle.cpp
+++ b/source/ClientHandle.cpp
@@ -619,8 +619,10 @@ void cClientHandle::HandleBlockDigStarted(int a_BlockX, int a_BlockY, int a_Bloc
m_LastDigBlockY = a_BlockY;
m_LastDigBlockZ = a_BlockZ;
- // In creative mode, digging is done immediately
- if (m_Player->GetGameMode() == eGameMode_Creative)
+ if (
+ (m_Player->GetGameMode() == eGameMode_Creative) || // In creative mode, digging is done immediately
+ g_BlockOneHitDig[a_OldBlock] // One-hit blocks get destroyed immediately, too
+ )
{
HandleBlockDigFinished(a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_OldBlock, a_OldMeta);
return;