summaryrefslogtreecommitdiffstats
path: root/src/Entities/Entity.cpp
diff options
context:
space:
mode:
authorpeterbell10 <peterbell10@live.co.uk>2018-07-26 23:24:36 +0200
committerGitHub <noreply@github.com>2018-07-26 23:24:36 +0200
commit950aeffff8d641a0855fbd9a9b2993d9dfd7d2c3 (patch)
tree5e6fde4625714922e970bd5ad4ea339f58ab6b57 /src/Entities/Entity.cpp
parentAt long last... Piston animations! (diff)
downloadcuberite-950aeffff8d641a0855fbd9a9b2993d9dfd7d2c3.tar
cuberite-950aeffff8d641a0855fbd9a9b2993d9dfd7d2c3.tar.gz
cuberite-950aeffff8d641a0855fbd9a9b2993d9dfd7d2c3.tar.bz2
cuberite-950aeffff8d641a0855fbd9a9b2993d9dfd7d2c3.tar.lz
cuberite-950aeffff8d641a0855fbd9a9b2993d9dfd7d2c3.tar.xz
cuberite-950aeffff8d641a0855fbd9a9b2993d9dfd7d2c3.tar.zst
cuberite-950aeffff8d641a0855fbd9a9b2993d9dfd7d2c3.zip
Diffstat (limited to '')
-rw-r--r--src/Entities/Entity.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/Entities/Entity.cpp b/src/Entities/Entity.cpp
index a71c68708..b8ec005bd 100644
--- a/src/Entities/Entity.cpp
+++ b/src/Entities/Entity.cpp
@@ -185,6 +185,7 @@ void cEntity::WrapHeadYaw(void)
+
void cEntity::WrapRotation(void)
{
m_Rot.x = NormalizeAngleDegrees(m_Rot.x);
@@ -194,6 +195,7 @@ void cEntity::WrapRotation(void)
+
void cEntity::WrapSpeed(void)
{
m_Speed.x = Clamp(m_Speed.x, -78.0, 78.0);
@@ -264,7 +266,6 @@ void cEntity::DestroyNoScheduling(bool a_ShouldBroadcast)
-
void cEntity::TakeDamage(cEntity & a_Attacker)
{
int RawDamage = a_Attacker.GetRawDamageAgainst(*this);
@@ -590,6 +591,7 @@ int cEntity::GetRawDamageAgainst(const cEntity & a_Receiver)
+
void cEntity::ApplyArmorDamage(int DamageBlocked)
{
// cEntities don't necessarily have armor to damage.
@@ -681,7 +683,6 @@ int cEntity::GetEnchantmentCoverAgainst(const cEntity * a_Attacker, eDamageType
-
float cEntity::GetEnchantmentBlastKnockbackReduction()
{
UInt32 MaxLevel = 0;
@@ -707,7 +708,6 @@ float cEntity::GetEnchantmentBlastKnockbackReduction()
-
int cEntity::GetArmorCoverAgainst(const cEntity * a_Attacker, eDamageType a_DamageType, int a_Damage)
{
// Returns the hitpoints out of a_RawDamage that the currently equipped armor would cover
@@ -1323,6 +1323,7 @@ void cEntity::DetectCacti(void)
+
void cEntity::ScheduleMoveToWorld(cWorld * a_World, Vector3d a_NewPosition, bool a_SetPortalCooldown, bool a_ShouldSendRespawn)
{
m_NewWorld = a_World;
@@ -1335,6 +1336,7 @@ void cEntity::ScheduleMoveToWorld(cWorld * a_World, Vector3d a_NewPosition, bool
+
bool cEntity::DetectPortal()
{
// If somebody scheduled a world change with ScheduleMoveToWorld, change worlds now.
@@ -1961,6 +1963,7 @@ void cEntity::BroadcastMovementUpdate(const cClientHandle * a_Exclude)
+
cEntity * cEntity::GetAttached()
{
return m_AttachedTo;
@@ -2107,6 +2110,7 @@ void cEntity::SetSpeed(double a_SpeedX, double a_SpeedY, double a_SpeedZ)
+
void cEntity::SetSpeedX(double a_SpeedX)
{
SetSpeed(a_SpeedX, m_Speed.y, m_Speed.z);
@@ -2115,6 +2119,7 @@ void cEntity::SetSpeedX(double a_SpeedX)
+
void cEntity::SetSpeedY(double a_SpeedY)
{
SetSpeed(m_Speed.x, a_SpeedY, m_Speed.z);
@@ -2123,6 +2128,7 @@ void cEntity::SetSpeedY(double a_SpeedY)
+
void cEntity::SetSpeedZ(double a_SpeedZ)
{
SetSpeed(m_Speed.x, m_Speed.y, a_SpeedZ);
@@ -2140,6 +2146,7 @@ void cEntity::SetWidth(double a_Width)
+
void cEntity::AddSpeed(double a_AddSpeedX, double a_AddSpeedY, double a_AddSpeedZ)
{
DoSetSpeed(m_Speed.x + a_AddSpeedX, m_Speed.y + a_AddSpeedY, m_Speed.z + a_AddSpeedZ);
@@ -2248,6 +2255,7 @@ void cEntity::AddLeashedMob(cMonster * a_Monster)
+
void cEntity::RemoveLeashedMob(cMonster * a_Monster)
{
ASSERT(a_Monster->GetLeashedTo() == this);
@@ -2262,7 +2270,6 @@ void cEntity::RemoveLeashedMob(cMonster * a_Monster)
-
float cEntity::GetExplosionExposureRate(Vector3d a_ExplosionPosition, float a_ExlosionPower)
{
double EntitySize = m_Width * m_Width * m_Height;