Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/entity.h')
-rw-r--r--src/core/entity.h37
1 files changed, 16 insertions, 21 deletions
diff --git a/src/core/entity.h b/src/core/entity.h
index 2719040..e51dac3 100644
--- a/src/core/entity.h
+++ b/src/core/entity.h
@@ -166,11 +166,16 @@ public:
return entity_body;
}
- /// collision shape
+ /// physics collision shape
inline btCollisionShape *collision_shape() {
return entity_collision_shape;
}
+ /// physics motion info
+ inline btMotionState *motionstate() {
+ return entity_motionstate;
+ }
+
/// indicates a server-side entity
inline const bool serverside() const {
return entity_serverside;
@@ -277,10 +282,6 @@ public:
/* ---- actors ---------------------------------------------------- */
- /// called when the entity received a docking request
- // FIXME move docking functions to game
- virtual void dock(Entity *entity);
-
/// set flags
inline void set_flag(Flags flag) {
entity_flags |= flag;
@@ -419,8 +420,10 @@ public:
float entity_servertimestamp;
protected:
- btRigidBody *entity_body;
- btCollisionShape *entity_collision_shape;
+ btRigidBody *entity_body;
+ btRigidBody::btRigidBodyConstructionInfo *entity_body_info;
+ btCollisionShape *entity_collision_shape;
+ btMotionState *entity_motionstate;
private:
unsigned int entity_id;
@@ -489,11 +492,7 @@ public:
return entity_timer;
}
- inline btMotionState *motionstate() {
- return entity_motionstate;
- }
-
- /*----- mutators -------------------------------------------------- */
+/*----- mutators -------------------------------------------------- */
/// mass of the entity
inline void set_mass(const float mass) {
@@ -505,11 +504,6 @@ public:
entity_speed = speed;
}
- /**
- * @brief reset the physics state
- */
- virtual void reset();
-
/*----- serializers ----------------------------------------------- */
/// serialize the entity to a stream
@@ -542,13 +536,14 @@ public:
*/
virtual void frame(float seconds);
+ /**
+ * @brief reset the physics state
+ */
+ virtual void reset();
+
protected:
float entity_timer;
int entity_state;
-
- btMotionState *entity_motionstate;
-
-
};
/// an entity that can be controlled by a player