summaryrefslogtreecommitdiffstats
path: root/src/Entities/Player.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Entities/Player.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp
index e057c25fe..c2a76342d 100644
--- a/src/Entities/Player.cpp
+++ b/src/Entities/Player.cpp
@@ -63,6 +63,8 @@ cPlayer::cPlayer(cClientHandle* a_Client, const AString & a_PlayerName)
, m_IsSprinting(false)
, m_IsSwimming(false)
, m_IsSubmerged(false)
+ , m_IsFlying(false)
+ , m_CanFly(false)
, m_EatingFinishTick(-1)
, m_IsChargingBow(false)
, m_BowCharge(0)
@@ -751,6 +753,36 @@ void cPlayer::SetSprint(bool a_IsSprinting)
+void cPlayer::SetCanFly(bool a_CanFly)
+{
+ if (a_CanFly == m_CanFly)
+ {
+ return;
+ }
+
+ m_CanFly = a_CanFly;
+ m_ClientHandle->SendPlayerAbilities();
+}
+
+
+
+
+
+void cPlayer::SetFlying(bool a_IsFlying)
+{
+ if (a_IsFlying == m_IsFlying)
+ {
+ return;
+ }
+
+ m_IsFlying = a_IsFlying;
+ m_ClientHandle->SendPlayerAbilities();
+}
+
+
+
+
+
void cPlayer::DoTakeDamage(TakeDamageInfo & a_TDI)
{
if (a_TDI.DamageType != dtInVoid)