summaryrefslogtreecommitdiffstats
path: root/src/ChunkMap.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-08-30 22:24:04 +0200
committermadmaxoft <github@xoft.cz>2014-08-30 22:24:04 +0200
commitdb663c7ee1737f5e03c0bce6584933123b9d58e3 (patch)
treea6ad2990fdaff104c3663a8655be26ad55dc1ccc /src/ChunkMap.cpp
parentMerge branch 'master' into fixes (diff)
downloadcuberite-db663c7ee1737f5e03c0bce6584933123b9d58e3.tar
cuberite-db663c7ee1737f5e03c0bce6584933123b9d58e3.tar.gz
cuberite-db663c7ee1737f5e03c0bce6584933123b9d58e3.tar.bz2
cuberite-db663c7ee1737f5e03c0bce6584933123b9d58e3.tar.lz
cuberite-db663c7ee1737f5e03c0bce6584933123b9d58e3.tar.xz
cuberite-db663c7ee1737f5e03c0bce6584933123b9d58e3.tar.zst
cuberite-db663c7ee1737f5e03c0bce6584933123b9d58e3.zip
Diffstat (limited to '')
-rw-r--r--src/ChunkMap.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ChunkMap.cpp b/src/ChunkMap.cpp
index 8ca61e2cf..a3692ef11 100644
--- a/src/ChunkMap.cpp
+++ b/src/ChunkMap.cpp
@@ -1880,10 +1880,11 @@ void cChunkMap::DoExplosionAt(double a_ExplosionSize, double a_BlockX, double a_
}
else if ((m_World->GetTNTShrapnelLevel() > slNone) && (m_World->GetTickRandomNumber(100) < 20)) // 20% chance of flinging stuff around
{
+ // If the block is shrapnel-able, make a falling block entity out of it:
if (
((m_World->GetTNTShrapnelLevel() == slAll) && cBlockInfo::FullyOccupiesVoxel(Block)) ||
((m_World->GetTNTShrapnelLevel() == slGravityAffectedOnly) && ((Block == E_BLOCK_SAND) || (Block == E_BLOCK_GRAVEL)))
- )
+ )
{
m_World->SpawnFallingBlock(bx + x, by + y + 5, bz + z, Block, area.GetBlockMeta(bx + x, by + y, bz + z));
}
@@ -1891,7 +1892,7 @@ void cChunkMap::DoExplosionAt(double a_ExplosionSize, double a_BlockX, double a_
area.SetBlockTypeMeta(bx + x, by + y, bz + z, E_BLOCK_AIR, 0);
a_BlocksAffected.push_back(Vector3i(bx + x, by + y, bz + z));
- break;
+ break;
}
} // switch (BlockType)
} // for z