From 994e1d73355df62fb458936433f7478c9a0ef1ba Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Wed, 27 Nov 2013 22:03:04 +0000 Subject: Made TNT pickups spawning chance 25% --- src/ChunkMap.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ChunkMap.cpp') diff --git a/src/ChunkMap.cpp b/src/ChunkMap.cpp index 611e9f24e..75346f9b2 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(4) == 4) // Around 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); -- cgit v1.2.3 From f9e1be0d57f28c72b415c1b6cd37c1c2383c0679 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Thu, 28 Nov 2013 18:22:13 +0000 Subject: Improved TNT pickup randomisation --- src/ChunkMap.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ChunkMap.cpp') diff --git a/src/ChunkMap.cpp b/src/ChunkMap.cpp index 75346f9b2..7d5b61346 100644 --- a/src/ChunkMap.cpp +++ b/src/ChunkMap.cpp @@ -1655,7 +1655,7 @@ void cChunkMap::DoExplosionAt(double a_ExplosionSize, double a_BlockX, double a_ default: { - if (m_World->GetTickRandomNumber(4) == 4) // Around 25% chance of pickups + if (m_World->GetTickRandomNumber(100) <= 25) // 25% chance of pickups { cItems Drops; cBlockHandler * Handler = BlockHandler(Block); -- cgit v1.2.3 From 96759637e94ddbe0d6cbf11505a6c63c254786ff Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Thu, 28 Nov 2013 18:24:25 +0000 Subject: Fixed a bug with TNT waking simulators --- src/ChunkMap.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ChunkMap.cpp') diff --git a/src/ChunkMap.cpp b/src/ChunkMap.cpp index 7d5b61346..692f97ddf 100644 --- a/src/ChunkMap.cpp +++ b/src/ChunkMap.cpp @@ -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 ); } -- cgit v1.2.3