From de03dd6460c59c8abdd5b613ffa73511486022fc Mon Sep 17 00:00:00 2001 From: "keyboard.osh@gmail.com" Date: Mon, 22 Apr 2013 07:18:03 +0000 Subject: Moved physics to the cEntity class from the derivative classes (cMonster, cPickup). Added physics override to cPlayer to disable physics calculations. Fixed bug with pitch calculations on mobs. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1400 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Entity.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source/Entity.h') diff --git a/source/Entity.h b/source/Entity.h index 5871ce89c..3009bc611 100644 --- a/source/Entity.h +++ b/source/Entity.h @@ -159,7 +159,7 @@ public: // tolua_end virtual void Tick(float a_Dt, cChunk & a_Chunk); - virtual void HandlePhysics(float a_Dt, cChunk & a_Chunk) {} + virtual void HandlePhysics(float a_Dt, cChunk & a_Chunk); /** Descendants override this function to send a command to the specified client to spawn the entity on the client. To spawn on all eligible clients, use cChunkMap::BroadcastSpawnEntity() @@ -220,6 +220,9 @@ protected: bool m_bDirtyPosition; bool m_bDirtySpeed; + bool m_bOnGround; + float m_Gravity; + // Last Position. double m_LastPosX, m_LastPosY, m_LastPosZ; @@ -248,6 +251,7 @@ private: Vector3d m_Speed; Vector3d m_Rot; Vector3d m_Pos; + Vector3d m_WaterSpeed; } ; // tolua_export typedef std::list cEntityList; -- cgit v1.2.3