summaryrefslogtreecommitdiffstats
path: root/src/ChunkMap.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2013-11-28 19:59:44 +0100
committerMattes D <github@xoft.cz>2013-11-28 19:59:44 +0100
commit13dade5a83afec03df1101ebfbea928a59e1f420 (patch)
tree2366cc39fd0811fe3e9b5fabd129a2d1fef84edc /src/ChunkMap.cpp
parentMerge pull request #374 from mc-server/VS2013compilefix (diff)
parentFixed a bug with TNT waking simulators (diff)
downloadcuberite-13dade5a83afec03df1101ebfbea928a59e1f420.tar
cuberite-13dade5a83afec03df1101ebfbea928a59e1f420.tar.gz
cuberite-13dade5a83afec03df1101ebfbea928a59e1f420.tar.bz2
cuberite-13dade5a83afec03df1101ebfbea928a59e1f420.tar.lz
cuberite-13dade5a83afec03df1101ebfbea928a59e1f420.tar.xz
cuberite-13dade5a83afec03df1101ebfbea928a59e1f420.tar.zst
cuberite-13dade5a83afec03df1101ebfbea928a59e1f420.zip
Diffstat (limited to 'src/ChunkMap.cpp')
-rw-r--r--src/ChunkMap.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ChunkMap.cpp b/src/ChunkMap.cpp
index 611e9f24e..692f97ddf 100644
--- a/src/ChunkMap.cpp
+++ b/src/ChunkMap.cpp
@@ -1655,12 +1655,12 @@ void cChunkMap::DoExplosionAt(double a_ExplosionSize, double a_BlockX, double a_
default:
{
- if (m_World->GetTickRandomNumber(10) == 5)
+ if (m_World->GetTickRandomNumber(100) <= 25) // 25% chance of pickups
{
cItems Drops;
cBlockHandler * Handler = BlockHandler(Block);
- Handler->ConvertToPickups(Drops, area.GetBlockMeta(bx + x, by + y, bz + z));
+ 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);
}
area.SetBlockType(bx + x, by + y, bz + z, E_BLOCK_AIR);
@@ -1674,9 +1674,9 @@ void cChunkMap::DoExplosionAt(double a_ExplosionSize, double a_BlockX, double a_
// Wake up all simulators for the area, so that water and lava flows and sand falls into the blasted holes (FS #391):
WakeUpSimulatorsInArea(
- bx - ExplosionSizeInt, bx + ExplosionSizeInt + 1,
+ bx - ExplosionSizeInt - 1, bx + ExplosionSizeInt + 1,
MinY, MaxY,
- bz - ExplosionSizeInt, bz + ExplosionSizeInt + 1
+ bz - ExplosionSizeInt - 1, bz + ExplosionSizeInt + 1
);
}