From a884fbb91937d3243c15477428a31cc764d03a84 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Sun, 1 Sep 2013 22:40:35 +0200 Subject: Arrows deal damage. Still needs some tweaks, they hit the shooter most of the time. --- source/Entities/ProjectileEntity.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/Entities/ProjectileEntity.h') diff --git a/source/Entities/ProjectileEntity.h b/source/Entities/ProjectileEntity.h index 95dc00abc..da82c82ea 100644 --- a/source/Entities/ProjectileEntity.h +++ b/source/Entities/ProjectileEntity.h @@ -50,6 +50,9 @@ public: /// Called by the physics blocktracer when the entity hits a solid block, the block's coords and the face hit is given virtual void OnHitSolidBlock(int a_BlockX, int a_BlockY, int a_BlockZ, char a_BlockFace); + /// Called by the physics blocktracer when the entity hits another entity + virtual void OnHitEntity(cEntity & a_EntityHit) {} + // tolua_begin /// Returns the kind of the projectile (fast class identification) @@ -140,6 +143,7 @@ protected: // cProjectileEntity overrides: virtual void SpawnOn(cClientHandle & a_Client) override; + virtual void OnHitEntity(cEntity & a_EntityHit) override; // tolua_begin } ; -- cgit v1.2.3