summaryrefslogtreecommitdiffstats
path: root/src/ChunkMap.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-03-18 21:45:10 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-03-18 21:45:10 +0100
commit23ffaa19b7c93f076a2d5a85018f7fb1a2260ea8 (patch)
tree1a296ced512584e7e04d22263375ba3a6f38f813 /src/ChunkMap.cpp
parentMerge remote-tracking branch 'origin/master' into awesometnt (diff)
downloadcuberite-23ffaa19b7c93f076a2d5a85018f7fb1a2260ea8.tar
cuberite-23ffaa19b7c93f076a2d5a85018f7fb1a2260ea8.tar.gz
cuberite-23ffaa19b7c93f076a2d5a85018f7fb1a2260ea8.tar.bz2
cuberite-23ffaa19b7c93f076a2d5a85018f7fb1a2260ea8.tar.lz
cuberite-23ffaa19b7c93f076a2d5a85018f7fb1a2260ea8.tar.xz
cuberite-23ffaa19b7c93f076a2d5a85018f7fb1a2260ea8.tar.zst
cuberite-23ffaa19b7c93f076a2d5a85018f7fb1a2260ea8.zip
Diffstat (limited to 'src/ChunkMap.cpp')
-rw-r--r--src/ChunkMap.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/ChunkMap.cpp b/src/ChunkMap.cpp
index ab4e01334..6ce928252 100644
--- a/src/ChunkMap.cpp
+++ b/src/ChunkMap.cpp
@@ -1832,13 +1832,17 @@ void cChunkMap::DoExplosionAt(double a_ExplosionSize, double a_BlockX, double a_
Handler->ConvertToPickups(Drops, area.GetBlockMeta(bx + x, by + y, bz + z)); // Stone becomes cobblestone, coal ore becomes coal, etc.
m_World->SpawnItemPickups(Drops, bx + x, by + y, bz + z);
}
- else if (m_World->IsTNTShrapnelEnabled() && (m_World->GetTickRandomNumber(100) < 20)) // 20% chance of flinging stuff around
+ else if ((m_World->GetTNTShrapnelLevel() > 0) && (m_World->GetTickRandomNumber(100) < 20)) // 20% chance of flinging stuff around
{
- if (!cBlockInfo::FullyOccupiesVoxel(area.GetBlockType(bx + x, by + y, bz + z)))
+ if (!cBlockInfo::FullyOccupiesVoxel(Block))
{
break;
}
- m_World->SpawnFallingBlock(bx + x, by + y + 5, bz + z, area.GetBlockType(bx + x, by + y, bz + z), area.GetBlockMeta(bx + x, by + y, bz + z));
+ else if ((m_World->GetTNTShrapnelLevel() == 1) && ((Block != E_BLOCK_SAND) && (Block != E_BLOCK_GRAVEL)))
+ {
+ break;
+ }
+ m_World->SpawnFallingBlock(bx + x, by + y + 5, bz + z, Block, area.GetBlockMeta(bx + x, by + y, bz + z));
}
area.SetBlockType(bx + x, by + y, bz + z, E_BLOCK_AIR);
a_BlocksAffected.push_back(Vector3i(bx + x, by + y, bz + z));