From adb7309b22091b595d2bd11222dd1ec3ca1bab82 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Thu, 10 Feb 2011 19:21:02 +0000 Subject: Corrected physics on dynamic entities like cargo pods. --- src/core/entity.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/core/entity.h') diff --git a/src/core/entity.h b/src/core/entity.h index e12123e..54849b7 100644 --- a/src/core/entity.h +++ b/src/core/entity.h @@ -158,11 +158,6 @@ public: return entity_speed; } - /// mass of the entity - inline const float mass() const { - return entity_mass; - } - /// physics body inline btRigidBody *body() { return entity_body; @@ -457,7 +452,6 @@ protected: // the previous zone the entity belonged too Zone* entity_oldzone; - float entity_mass; float entity_speed; private: @@ -525,6 +519,11 @@ public: return entity_state; } + /// mass of the entity + inline const float mass() const { + return entity_mass; + } + /// event state timer inline const float timer() const { return entity_timer; @@ -585,9 +584,11 @@ public: virtual void reset(); protected: + float entity_mass; float entity_timer; int entity_state; btMotionState *entity_motionstate; + }; /// an entity that can be controlled by a player -- cgit v1.2.3