diff options
author | nielsbreu@gmail.com <nielsbreu@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-06-18 22:32:22 +0200 |
---|---|---|
committer | nielsbreu@gmail.com <nielsbreu@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-06-18 22:32:22 +0200 |
commit | bcfa09aa1420a6bfed77c3492f186408ef1d5cc8 (patch) | |
tree | f8fa6bcfde1438f36f694af0cb1f29e638a5663c | |
parent | Crouching will allow block placement on otherwise functional blocks. (diff) | |
download | cuberite-bcfa09aa1420a6bfed77c3492f186408ef1d5cc8.tar cuberite-bcfa09aa1420a6bfed77c3492f186408ef1d5cc8.tar.gz cuberite-bcfa09aa1420a6bfed77c3492f186408ef1d5cc8.tar.bz2 cuberite-bcfa09aa1420a6bfed77c3492f186408ef1d5cc8.tar.lz cuberite-bcfa09aa1420a6bfed77c3492f186408ef1d5cc8.tar.xz cuberite-bcfa09aa1420a6bfed77c3492f186408ef1d5cc8.tar.zst cuberite-bcfa09aa1420a6bfed77c3492f186408ef1d5cc8.zip |
Diffstat (limited to '')
-rw-r--r-- | source/ChunkMap.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/ChunkMap.cpp b/source/ChunkMap.cpp index d03919a85..087afcc51 100644 --- a/source/ChunkMap.cpp +++ b/source/ChunkMap.cpp @@ -1499,6 +1499,17 @@ bool cChunkMap::ForEachEntityInChunk(int a_ChunkX, int a_ChunkZ, cEntityCallback void cChunkMap::DoExplosiontAt(float a_ExplosionSize, int a_BlockX, int a_BlockY, int a_BlockZ, cVector3iArray & a_BlocksAffected) { + switch (m_World->GetBlock(a_BlockX, a_BlockY, a_BlockZ)) + // Check if the explosion is in a liquid. + { + case E_BLOCK_WATER: + case E_BLOCK_STATIONARY_WATER: + case E_BLOCK_LAVA: + case E_BLOCK_STATIONARY_LAVA: + { + return; + } + } cBlockArea area; int ExplosionSizeInt = (int) ceil(a_ExplosionSize); int ExplosionSizeSq = ExplosionSizeInt * ExplosionSizeInt; |