diff options
author | Stijn Buys <ingar@osirion.org> | 2012-04-22 19:48:27 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2012-04-22 19:48:27 +0000 |
commit | 8f124fabdfd6761cefbcc2c4120ba325692f5d0b (patch) | |
tree | 21d38bdc6088654802d736dcb905429c42bd591a /src/core/entity.h | |
parent | d1931b1ebbe79cbd0f41290acbf9cb6d4c462878 (diff) |
Initial support for per-entity weapon slots.
Diffstat (limited to 'src/core/entity.h')
-rw-r--r-- | src/core/entity.h | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/src/core/entity.h b/src/core/entity.h index d071c06..77bc2d8 100644 --- a/src/core/entity.h +++ b/src/core/entity.h @@ -30,6 +30,7 @@ class EntityControlable; #include "core/label.h" #include "core/physics.h" #include "core/player.h" +#include "core/slots.h" #include "core/zone.h" namespace core @@ -195,6 +196,11 @@ public: return entity_inventory; } + /// entity weapon slots + inline Slots *slots() const { + return entity_slots; + } + /// entity info inline const Info *info() const { return entity_info; @@ -329,12 +335,24 @@ public: * @brief add an inventory to this entity * If this entity already has an inventory, * the current inventory will be return - */ + * */ Inventory *add_inventory(); + + /** + * @brief add equipment slots to this entity + * If this entity already has slots, + * the current slots will be returned. + * */ + Slots *add_slots(); + /** + * @brief set the information record for this entity + * */ void set_info(const Info *info); - /// set the timestamp when the entity was last alive + /** + * @brief set the timestamp when the entity was last alive + * */ void set_keepalive(unsigned long timestamp) { entity_keepalive = timestamp; } @@ -499,6 +517,7 @@ private: Menus entity_menus; Inventory* entity_inventory; + Slots* entity_slots; const Info* entity_info; Extension* entity_extension[4]; @@ -746,6 +765,9 @@ public: /// set afterburner/reverse void set_afterburner(float afterburner); + + /// set aim + void set_target_aim(const math::Vector3f &aim); /** * @brief runs one game frame for the entity @@ -793,6 +815,8 @@ protected: float target_strafe; float target_vstrafe; + + math::Vector3f target_aim; int entity_control_flags; |