summaryrefslogtreecommitdiffstats
path: root/src/Entities/Entity.cpp
diff options
context:
space:
mode:
authorLogicParrot <LogicParrot@users.noreply.github.com>2017-09-02 13:47:56 +0200
committerLogicParrot <LogicParrot@users.noreply.github.com>2017-09-02 13:47:56 +0200
commit0710995922546a904d5d018d2d5505017e24c0fc (patch)
tree101db7e8a701edfe965d9ee8a25cb9a3191cdcda /src/Entities/Entity.cpp
parentLambda revert fix (diff)
downloadcuberite-0710995922546a904d5d018d2d5505017e24c0fc.tar
cuberite-0710995922546a904d5d018d2d5505017e24c0fc.tar.gz
cuberite-0710995922546a904d5d018d2d5505017e24c0fc.tar.bz2
cuberite-0710995922546a904d5d018d2d5505017e24c0fc.tar.lz
cuberite-0710995922546a904d5d018d2d5505017e24c0fc.tar.xz
cuberite-0710995922546a904d5d018d2d5505017e24c0fc.tar.zst
cuberite-0710995922546a904d5d018d2d5505017e24c0fc.zip
Diffstat (limited to 'src/Entities/Entity.cpp')
-rw-r--r--src/Entities/Entity.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Entities/Entity.cpp b/src/Entities/Entity.cpp
index 5f6b81497..9ac8d2e3c 100644
--- a/src/Entities/Entity.cpp
+++ b/src/Entities/Entity.cpp
@@ -406,6 +406,16 @@ void cEntity::SetPitchFromSpeed(void)
+const Vector3i cEntity::GetHeadPosition(void)
+{
+ int HeadHeight = CeilC(GetPosY() + GetHeight()) - 1;
+ return Vector3i(POSX_TOINT, HeadHeight, POSZ_TOINT);
+}
+
+
+
+
+
bool cEntity::DoTakeDamage(TakeDamageInfo & a_TDI)
{
if (m_Health <= 0)