summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMat <mail@mathias.is>2020-03-22 14:02:21 +0100
committerGitHub <noreply@github.com>2020-03-22 14:02:21 +0100
commit00ae9604e11e2f0859fb219029c903662fe27bfd (patch)
tree07e554d77dd991ea68f8b26567a89d70d353b1c9 /src
parentFix typo in fish meta (diff)
downloadcuberite-00ae9604e11e2f0859fb219029c903662fe27bfd.tar
cuberite-00ae9604e11e2f0859fb219029c903662fe27bfd.tar.gz
cuberite-00ae9604e11e2f0859fb219029c903662fe27bfd.tar.bz2
cuberite-00ae9604e11e2f0859fb219029c903662fe27bfd.tar.lz
cuberite-00ae9604e11e2f0859fb219029c903662fe27bfd.tar.xz
cuberite-00ae9604e11e2f0859fb219029c903662fe27bfd.tar.zst
cuberite-00ae9604e11e2f0859fb219029c903662fe27bfd.zip
Diffstat (limited to '')
-rw-r--r--src/ChunkMap.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ChunkMap.cpp b/src/ChunkMap.cpp
index 364dfbb3d..98d63df94 100644
--- a/src/ChunkMap.cpp
+++ b/src/ChunkMap.cpp
@@ -1303,7 +1303,7 @@ void cChunkMap::DoExplosionAt(double a_ExplosionSize, double a_BlockX, double a_
}
// Ensure that the damage dealt is inversely proportional to the distance to the TNT centre - the closer a player is, the harder they are hit
- a_Entity.TakeDamage(dtExplosion, nullptr, static_cast<int>((1 / DistanceFromExplosion.Length()) * 6 * ExplosionSizeInt), 0);
+ a_Entity.TakeDamage(dtExplosion, nullptr, static_cast<int>((1 / std::max(1.0, DistanceFromExplosion.Length())) * 8 * ExplosionSizeInt), 0);
}
double Length = DistanceFromExplosion.Length();