summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-06-19 22:21:26 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-06-19 22:21:26 +0200
commit30f808034cd6abddde429d37f9d577e34bbb1fdc (patch)
tree2bfe42c5f0ce8b96acd32be4f5844c709da34426 /source
parentExplosions do not effect the terrain when they are in water. (diff)
downloadcuberite-30f808034cd6abddde429d37f9d577e34bbb1fdc.tar
cuberite-30f808034cd6abddde429d37f9d577e34bbb1fdc.tar.gz
cuberite-30f808034cd6abddde429d37f9d577e34bbb1fdc.tar.bz2
cuberite-30f808034cd6abddde429d37f9d577e34bbb1fdc.tar.lz
cuberite-30f808034cd6abddde429d37f9d577e34bbb1fdc.tar.xz
cuberite-30f808034cd6abddde429d37f9d577e34bbb1fdc.tar.zst
cuberite-30f808034cd6abddde429d37f9d577e34bbb1fdc.zip
Diffstat (limited to 'source')
-rw-r--r--source/ChunkMap.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/ChunkMap.cpp b/source/ChunkMap.cpp
index 087afcc51..ca38c8df1 100644
--- a/source/ChunkMap.cpp
+++ b/source/ChunkMap.cpp
@@ -1499,8 +1499,8 @@ 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)
{
+ // Don't explode if the explosion center is inside a liquid block:
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:
@@ -1510,6 +1510,7 @@ void cChunkMap::DoExplosiontAt(float a_ExplosionSize, int a_BlockX, int a_BlockY
return;
}
}
+
cBlockArea area;
int ExplosionSizeInt = (int) ceil(a_ExplosionSize);
int ExplosionSizeSq = ExplosionSizeInt * ExplosionSizeInt;