From 071b7be3d4d08c337c01de7abca034e6c3746194 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dami=C3=A1n=20Imrich?= Date: Sat, 3 Apr 2021 19:45:20 +0200 Subject: Basic elytra flight (#5124) * Basic elytra flight Co-authored-by: 12xx12 <44411062+12xx12@users.noreply.github.com> Co-authored-by: Tiger Wang --- src/Entities/Pawn.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/Entities/Pawn.cpp') 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(m_LastGroundHeight - GetPosY() - 3.0); if ((Damage > 0) && !FallDamageAbsorbed) { + if (IsElytraFlying()) + { + Damage = static_cast(static_cast(Damage) * 0.33); + } + TakeDamage(dtFalling, nullptr, Damage, static_cast(Damage), 0); // Fall particles -- cgit v1.2.3