summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMasy98 <masy@antheruscraft.de>2014-09-27 21:49:03 +0200
committerMasy98 <masy@antheruscraft.de>2014-09-27 21:49:03 +0200
commit79110b29dbdfafae13ae4448b1672b129ebf7128 (patch)
treea9e04a18f129ccbaa2ba1e2a53d5ca114a367e80
parentAdded barriers correctly (diff)
downloadcuberite-79110b29dbdfafae13ae4448b1672b129ebf7128.tar
cuberite-79110b29dbdfafae13ae4448b1672b129ebf7128.tar.gz
cuberite-79110b29dbdfafae13ae4448b1672b129ebf7128.tar.bz2
cuberite-79110b29dbdfafae13ae4448b1672b129ebf7128.tar.lz
cuberite-79110b29dbdfafae13ae4448b1672b129ebf7128.tar.xz
cuberite-79110b29dbdfafae13ae4448b1672b129ebf7128.tar.zst
cuberite-79110b29dbdfafae13ae4448b1672b129ebf7128.zip
-rw-r--r--src/ClientHandle.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp
index 52ea59884..3bd48eb3d 100644
--- a/src/ClientHandle.cpp
+++ b/src/ClientHandle.cpp
@@ -1148,15 +1148,18 @@ void cClientHandle::HandleBlockDigFinished(int a_BlockX, int a_BlockY, int a_Blo
FinishDigAnimation();
- if (!m_Player->IsGameModeCreative() && (a_OldBlock == E_BLOCK_BEDROCK))
- {
- Kick("You can't break a bedrock!");
- return;
- }
- if (!m_Player->IsGameModeCreative() && (a_OldBlock == E_BLOCK_BARRIER))
+ if (!m_Player->IsGameModeCreative())
{
- Kick("You can't break a barrier!");
- return;
+ if (a_OldBlock == E_BLOCK_BEDROCK)
+ {
+ Kick("You can't break a bedrock!");
+ return;
+ }
+ if (a_OldBlock == E_BLOCK_BARRIER)
+ {
+ Kick("You can't break a barrier!");
+ return;
+ }
}
cWorld * World = m_Player->GetWorld();