diff options
author | Stijn Buys <ingar@osirion.org> | 2010-10-18 19:13:58 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2010-10-18 19:13:58 +0000 |
commit | 4c5b00221c9405c5af06143974fbc6296ebe46b5 (patch) | |
tree | 3bbe7fbc47f6238a086260c56964d2d654cf6124 /src/core/entity.h | |
parent | 85e3fd447aa3f45ba1dfe063b29a3e13f3416f11 (diff) |
local vstrafe support, initial ship collision, g_damping factor
Diffstat (limited to 'src/core/entity.h')
-rw-r--r-- | src/core/entity.h | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/src/core/entity.h b/src/core/entity.h index e51dac3..057ffb2 100644 --- a/src/core/entity.h +++ b/src/core/entity.h @@ -425,6 +425,11 @@ protected: btCollisionShape *entity_collision_shape; btMotionState *entity_motionstate; + // the zone the entity belongs to + Zone* entity_zone; + // the previous zone the entity belonged too + Zone* entity_oldzone; + private: unsigned int entity_id; unsigned int entity_flags; @@ -445,11 +450,6 @@ private: model::Model* entity_model; - // the zone the entity belongs to - Zone* entity_zone; - // the previous zone the entity belonged too - Zone* entity_oldzone; - Menus entity_menus; Inventory* entity_inventory; @@ -581,6 +581,11 @@ public: return entity_movement; } + /// physics vehicle container + inline btRaycastVehicle *vehicle() { + return entity_vehicle; + } + /*----- serializers ----------------------------------------------- */ /// serialize the entity to a stream @@ -594,6 +599,18 @@ public: /*----- mutators -------------------------------------------------- */ + /** + * @brief set the zone the entity is currently in + * this fuction removes the entity from its previous zone + * and removes it to the new one, if it is not 0 + */ + virtual void set_zone(Zone *zone); + + /** + * @brief reset the physics state + */ + virtual void reset(); + /// receive a client-to-server update from a stream virtual void receive_client_update(std::istream &is); @@ -671,6 +688,9 @@ protected: float entity_movement; + btRaycastVehicle::btVehicleTuning entity_vehicletuning; + btRaycastVehicle *entity_vehicle; + private: // owner of the entity Player *entity_owner; |