diff options
author | Stijn Buys <ingar@osirion.org> | 2012-11-25 21:25:02 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2012-11-25 21:25:02 +0000 |
commit | 438283d0029a6d82e1669b218a2481c5c4ea2dbd (patch) | |
tree | e34e94980191828339143028c25c191ccb314939 /src/core/entity.h | |
parent | 67325a0676006f27048debb55926a0ac9abb74ac (diff) |
Added entity minimum speed threshold.
Diffstat (limited to 'src/core/entity.h')
-rw-r--r-- | src/core/entity.h | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/src/core/entity.h b/src/core/entity.h index 31ed67b..0be81b9 100644 --- a/src/core/entity.h +++ b/src/core/entity.h @@ -349,11 +349,20 @@ public: /** * @brief unset flag * */ - inline void unset_flag(Flags flag) { + inline void unset_flag(Flags flag) + { entity_flags &= ~((unsigned int) flag); } /** + * @brief set flags + * */ + inline void set_flags(unsigned int flags) + { + entity_flags = flags; + } + + /** * @brief add an inventory to this entity * If this entity already has an inventory, * the current inventory will be return @@ -725,6 +734,14 @@ public: return entity_actioninterface; } + /** + * @brief current health, 0 - 100 + * */ + inline const float health() const + { + return entity_health; + } + /*----- serializers ----------------------------------------------- */ /// serialize the entity to a stream @@ -810,6 +827,9 @@ protected: /// current thrust float entity_thrust; + + /// current health + float entity_health; /* target_ variables can be set by the client */ |