Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2011-02-10 19:21:02 +0000
committerStijn Buys <ingar@osirion.org>2011-02-10 19:21:02 +0000
commitadb7309b22091b595d2bd11222dd1ec3ca1bab82 (patch)
treea2add7f22edb529c93008642ad8dd6ae55a01090 /src/core/entity.h
parenta012d56b0f230114de0e9b10e15023faa3c8a44c (diff)
Corrected physics on dynamic entities like cargo pods.
Diffstat (limited to 'src/core/entity.h')
-rw-r--r--src/core/entity.h13
1 files changed, 7 insertions, 6 deletions
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