summaryrefslogtreecommitdiffstats
path: root/src/Entities/Pawn.cpp
diff options
context:
space:
mode:
authorDamián Imrich <damian@haze.sk>2021-04-03 19:45:20 +0200
committerGitHub <noreply@github.com>2021-04-03 19:45:20 +0200
commit071b7be3d4d08c337c01de7abca034e6c3746194 (patch)
treeb878b6df8abe69493d61098610738edb8d95a82b /src/Entities/Pawn.cpp
parentFix finisher generating invalid pumpkin (diff)
downloadcuberite-071b7be3d4d08c337c01de7abca034e6c3746194.tar
cuberite-071b7be3d4d08c337c01de7abca034e6c3746194.tar.gz
cuberite-071b7be3d4d08c337c01de7abca034e6c3746194.tar.bz2
cuberite-071b7be3d4d08c337c01de7abca034e6c3746194.tar.lz
cuberite-071b7be3d4d08c337c01de7abca034e6c3746194.tar.xz
cuberite-071b7be3d4d08c337c01de7abca034e6c3746194.tar.zst
cuberite-071b7be3d4d08c337c01de7abca034e6c3746194.zip
Diffstat (limited to '')
-rw-r--r--src/Entities/Pawn.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Entities/Pawn.cpp b/src/Entities/Pawn.cpp
index 6f33a5eca..a58c1dc40 100644
--- a/src/Entities/Pawn.cpp
+++ b/src/Entities/Pawn.cpp
@@ -418,6 +418,11 @@ void cPawn::HandleFalling(void)
auto Damage = static_cast<int>(m_LastGroundHeight - GetPosY() - 3.0);
if ((Damage > 0) && !FallDamageAbsorbed)
{
+ if (IsElytraFlying())
+ {
+ Damage = static_cast<int>(static_cast<float>(Damage) * 0.33);
+ }
+
TakeDamage(dtFalling, nullptr, Damage, static_cast<float>(Damage), 0);
// Fall particles