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.cpp | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) (limited to 'src/Entities/Entity.cpp') diff --git a/src/Entities/Entity.cpp b/src/Entities/Entity.cpp index f1d8c989d..a6f7dd58c 100644 --- a/src/Entities/Entity.cpp +++ b/src/Entities/Entity.cpp @@ -59,6 +59,8 @@ cEntity::cEntity(eEntityType a_EntityType, Vector3d a_Pos, double a_Width, doubl m_IsInLava(false), m_IsInWater(false), m_IsHeadInWater(false), + m_Width(a_Width), + m_Height(a_Height), m_AirLevel(MAX_AIR_LEVEL), m_AirTickTimer(DROWNING_TICKS), m_TicksAlive(0), @@ -69,8 +71,6 @@ cEntity::cEntity(eEntityType a_EntityType, Vector3d a_Pos, double a_Width, doubl m_Position(a_Pos), m_WaterSpeed(0, 0, 0), m_Mass (0.001), // Default 1g - m_Width(a_Width), - m_Height(a_Height), m_InvulnerableTicks(0) { m_WorldChangeInfo.m_NewWorld = nullptr; @@ -2028,15 +2028,6 @@ void cEntity::SetHeadYaw(double a_HeadYaw) -void cEntity::SetHeight(double a_Height) -{ - m_Height = a_Height; -} - - - - - void cEntity::SetMass(double a_Mass) { // Make sure that mass is not zero. 1g is the default because we @@ -2118,15 +2109,6 @@ void cEntity::SetSpeedZ(double a_SpeedZ) -void cEntity::SetWidth(double a_Width) -{ - m_Width = a_Width; -} - - - - - void cEntity::AddSpeed(double a_AddSpeedX, double a_AddSpeedY, double a_AddSpeedZ) { SetSpeed(m_Speed.x + a_AddSpeedX, m_Speed.y + a_AddSpeedY, m_Speed.z + a_AddSpeedZ); -- cgit v1.2.3