Fixed Weird Tp Fail Damage (#5591)

* Fixed Weird Tp Fail Damage

* i added a ; by mistake

* Update CONTRIBUTORS

* fixed my name
This commit is contained in:
CoolPuppyKid 2024-12-03 17:22:37 -06:00 committed by GitHub
parent 05c9e06be1
commit 4b2b02a8ba
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 1 deletions

View File

@ -19,6 +19,7 @@ birkett (Anthony Birkett)
Bond_009
changyongGuo
Cocosushi6
CoolPuppyKid
DarkoGNU
derouinw
dImrich (Damian Imrich)

View File

@ -402,7 +402,7 @@ void cPawn::HandleFalling(void)
auto Player = static_cast<cPlayer *>(this);
/* 3. If the player is flying or climbing, absorb fall damage */
FallDamageAbsorbed |= Player->IsFlying() || Player->IsClimbing();
FallDamageAbsorbed |= Player->IsFlying() || Player->IsClimbing() || Player->GetIsTeleporting();
/* 4. If the player is about to bounce on a slime block and is not crouching, absorb all fall damage */
ShouldBounceOnSlime = !Player->IsCrouched();

View File

@ -147,6 +147,9 @@ public:
/** Cancels the current bow charging */
void CancelChargingBow(void);
/** Gets If The Player Is Teleporting To Fix https://github.com/cuberite/cuberite/issues/5542 */
bool GetIsTeleporting() { return m_IsTeleporting; }
/** Returns true if the player is currently charging the bow */
bool IsChargingBow(void) const { return m_IsChargingBow; }