From 4c5b00221c9405c5af06143974fbc6296ebe46b5 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Mon, 18 Oct 2010 19:13:58 +0000 Subject: local vstrafe support, initial ship collision, g_damping factor --- src/core/entity.h | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) (limited to 'src/core/entity.h') 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; -- cgit v1.2.3