Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2012-12-04 21:42:54 +0000
committerStijn Buys <ingar@osirion.org>2012-12-04 21:42:54 +0000
commit5701da5df3e5f0d3a40af0abf7e03302275dcca2 (patch)
tree6135b87fc0573183a02688b0415a1ed70a40c751 /src/core/entity.h
parenta3450f23b09e8d5c66f710fbaf085d6d3b6d8122 (diff)
Introduce Entity::hit() callback, prevent projectiles from doing no damage.
Diffstat (limited to 'src/core/entity.h')
-rw-r--r--src/core/entity.h6
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;