summaryrefslogtreecommitdiffstats
path: root/src/ChunkMap.cpp
diff options
context:
space:
mode:
authorAlexander Harkness <me@bearbin.net>2020-05-03 22:04:33 +0200
committerGitHub <noreply@github.com>2020-05-03 22:04:33 +0200
commit994036a3b8b09f8da1b6ec2055cc7a5ceb05a776 (patch)
tree54de33e0f563209cdabc40067b72328ec3126be8 /src/ChunkMap.cpp
parentUpdate src/Simulator/IncrementalRedstoneSimulator/RedstoneWireHandler.h (diff)
downloadcuberite-994036a3b8b09f8da1b6ec2055cc7a5ceb05a776.tar
cuberite-994036a3b8b09f8da1b6ec2055cc7a5ceb05a776.tar.gz
cuberite-994036a3b8b09f8da1b6ec2055cc7a5ceb05a776.tar.bz2
cuberite-994036a3b8b09f8da1b6ec2055cc7a5ceb05a776.tar.lz
cuberite-994036a3b8b09f8da1b6ec2055cc7a5ceb05a776.tar.xz
cuberite-994036a3b8b09f8da1b6ec2055cc7a5ceb05a776.tar.zst
cuberite-994036a3b8b09f8da1b6ec2055cc7a5ceb05a776.zip
Diffstat (limited to 'src/ChunkMap.cpp')
-rw-r--r--src/ChunkMap.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/ChunkMap.cpp b/src/ChunkMap.cpp
index 1713173f8..0ff4d5ff7 100644
--- a/src/ChunkMap.cpp
+++ b/src/ChunkMap.cpp
@@ -1298,9 +1298,8 @@ void cChunkMap::DoExplosionAt(double a_ExplosionSize, double a_BlockX, double a_
if (!a_Entity.IsTNT() && !a_Entity.IsFallingBlock()) // Don't apply damage to other TNT entities and falling blocks, they should be invincible
{
- cBoundingBox bbEntity(a_Entity.GetPosition(), a_Entity.GetWidth() / 2, a_Entity.GetHeight());
-
- if (!bbTNT.IsInside(bbEntity)) // If bbEntity is inside bbTNT, not vice versa!
+ auto EntityBox = a_Entity.GetBoundingBox();
+ if (!bbTNT.IsInside(EntityBox)) // If entity box is inside tnt box, not vice versa!
{
return false;
}