1
0

Basic elytra flight (#5124)

* Basic elytra flight

Co-authored-by: 12xx12 <44411062+12xx12@users.noreply.github.com>
Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
This commit is contained in:
Damián Imrich
2021-04-03 19:45:20 +02:00
committed by GitHub
parent ce6f8b3557
commit 071b7be3d4
18 changed files with 490 additions and 287 deletions

View File

@@ -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);