From 0710995922546a904d5d018d2d5505017e24c0fc Mon Sep 17 00:00:00 2001 From: LogicParrot Date: Sat, 2 Sep 2017 14:47:56 +0300 Subject: Reimplemented skeletons using Behaviors --- src/Entities/Entity.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/Entities/Entity.cpp') 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) -- cgit v1.2.3