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/Entity.h | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) (limited to 'src/Entities/Entity.h') diff --git a/src/Entities/Entity.h b/src/Entities/Entity.h index 9fe7f16f5..559f4eb66 100644 --- a/src/Entities/Entity.h +++ b/src/Entities/Entity.h @@ -328,10 +328,6 @@ public: // tolua_end - void SetHeight(double a_Height); - - void SetWidth(double a_Width); - /** Exported in ManualBindings */ const Vector3d & GetPosition(void) const { return m_Position; } @@ -522,12 +518,13 @@ public: // tolua_begin // COMMON metadata flags; descendants may override the defaults: - virtual bool IsOnFire (void) const {return (m_TicksLeftBurning > 0); } - virtual bool IsCrouched (void) const {return false; } - virtual bool IsRiding (void) const {return false; } - virtual bool IsSprinting(void) const {return false; } - virtual bool IsRclking (void) const {return false; } - virtual bool IsInvisible(void) const { return false; } + virtual bool IsCrouched (void) const { return false; } + virtual bool IsElytraFlying(void) const { return false; } + virtual bool IsInvisible (void) const { return false; } + virtual bool IsOnFire (void) const { return m_TicksLeftBurning > 0; } + virtual bool IsRclking (void) const { return false; } + virtual bool IsRiding (void) const { return false; } + virtual bool IsSprinting (void) const { return false; } /** Returns true if any part of the entity is in a fire block */ virtual bool IsInFire(void) const { return m_IsInFire; } @@ -689,6 +686,12 @@ protected: /** If the entity's head is in a water block */ bool m_IsHeadInWater; + /** Width of the entity, in the XZ plane. Since entities are represented as cylinders, this is more of a diameter. */ + double m_Width; + + /** Height of the entity (Y axis). */ + double m_Height; + /** Air level of a mobile */ int m_AirLevel; int m_AirTickTimer; @@ -745,12 +748,6 @@ private: /** Measured in Kilograms (Kg) */ double m_Mass; - /** Width of the entity, in the XZ plane. Since entities are represented as cylinders, this is more of a diameter. */ - double m_Width; - - /** Height of the entity (Y axis) */ - double m_Height; - /** If a player hit a entity, the entity receive a invulnerable of 10 ticks. While this ticks, a player can't hit this entity. */ int m_InvulnerableTicks; -- cgit v1.2.3