diff options
author | Stijn Buys <ingar@osirion.org> | 2012-12-04 21:42:54 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2012-12-04 21:42:54 +0000 |
commit | 5701da5df3e5f0d3a40af0abf7e03302275dcca2 (patch) | |
tree | 6135b87fc0573183a02688b0415a1ed70a40c751 /src/core/entity.h | |
parent | a3450f23b09e8d5c66f710fbaf085d6d3b6d8122 (diff) |
Introduce Entity::hit() callback, prevent projectiles from doing no damage.
Diffstat (limited to 'src/core/entity.h')
-rw-r--r-- | src/core/entity.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/entity.h b/src/core/entity.h index 0be81b9..df65843 100644 --- a/src/core/entity.h +++ b/src/core/entity.h @@ -662,6 +662,12 @@ public: * Warning: this can be called multiple times for a single collision * */ virtual void collision(Entity *other); + + /** + * @brief weapon hit callback + * This method is called by the core-engine if the entity is hit by a weapon. + * */ + virtual void hit(Entity *other); protected: float entity_mass; |