From 4ce0c5a983bbb82a0a8091ad735c6ec494c912e2 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Thu, 21 Feb 2013 21:55:36 +0000 Subject: Moved the Speed member into cEntity class instead of its descendants. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1222 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Entity.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'source/Entity.h') diff --git a/source/Entity.h b/source/Entity.h index 804e24490..f4f96df23 100644 --- a/source/Entity.h +++ b/source/Entity.h @@ -72,12 +72,16 @@ public: eEntityType_Pickup = etPickup, eEntityType_Mob = etMob, } ; + + // tolua_end cEntity(eEntityType a_EntityType, double a_X, double a_Y, double a_Z); virtual ~cEntity(); virtual void Initialize(cWorld * a_World); + // tolua_begin + eEntityType GetEntityType(void) const { return m_EntityType; } bool IsPlayer(void) const { return (m_EntityType == etPlayer); } @@ -107,6 +111,10 @@ public: float GetPitch (void) const {return m_Rot.y; } float GetRoll (void) const {return m_Rot.z; } Vector3f GetLookVector(void) const; + const Vector3d & GetSpeed (void) const { return m_Speed; } + double GetSpeedX (void) const { return m_Speed.x; } + double GetSpeedY (void) const { return m_Speed.y; } + double GetSpeedZ (void) const { return m_Speed.z; } int GetChunkX(void) const {return m_ChunkX; } int GetChunkY(void) const {return m_ChunkY; } @@ -168,10 +176,12 @@ protected: int m_ChunkX, m_ChunkY, m_ChunkZ; Vector3d m_Pos; - bool m_bDirtyPosition; + bool m_bDirtyPosition; Vector3f m_Rot; - bool m_bDirtyOrientation; + bool m_bDirtyOrientation; + + Vector3d m_Speed; bool m_bDestroyed; bool m_bRemovedFromChunk; -- cgit v1.2.3