summaryrefslogtreecommitdiffstats
path: root/source/Entities/ProjectileEntity.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--source/Entities/ProjectileEntity.h61
1 files changed, 59 insertions, 2 deletions
diff --git a/source/Entities/ProjectileEntity.h b/source/Entities/ProjectileEntity.h
index 43aecac0e..3e87f5a2c 100644
--- a/source/Entities/ProjectileEntity.h
+++ b/source/Entities/ProjectileEntity.h
@@ -51,7 +51,7 @@ public:
virtual void OnHitSolidBlock(const Vector3d & a_HitPos, char a_HitFace);
/// Called by the physics blocktracer when the entity hits another entity
- virtual void OnHitEntity(cEntity & a_EntityHit) {}
+ virtual void OnHitEntity(cEntity & a_EntityHit, const Vector3d & a_HitPos) {}
// tolua_begin
@@ -152,7 +152,7 @@ protected:
// cProjectileEntity overrides:
virtual void OnHitSolidBlock(const Vector3d & a_HitPos, char a_HitFace) override;
- virtual void OnHitEntity(cEntity & a_EntityHit) override;
+ virtual void OnHitEntity(cEntity & a_EntityHit, const Vector3d & a_HitPos) override;
// tolua_begin
} ;
@@ -231,12 +231,41 @@ public:
cThrownSnowballEntity(cEntity * a_Creator, double a_X, double a_Y, double a_Z, const Vector3d & a_Speed);
protected:
+
+ // cProjectileEntity overrides:
+ virtual void OnHitSolidBlock(const Vector3d & a_HitPos, char a_HitFace) override;
+
+ // tolua_begin
+
+} ;
+
+
+
+
+
+class cGhastFireballEntity :
+ public cProjectileEntity
+{
+ typedef cProjectileEntity super;
+
+public:
// tolua_end
+ CLASS_PROTODEF(cGhastFireballEntity);
+
+ cGhastFireballEntity(cEntity * a_Creator, double a_X, double a_Y, double a_Z, const Vector3d & a_Speed);
+
+protected:
+
+ void Explode(int a_BlockX, int a_BlockY, int a_BlockZ);
+
// cProjectileEntity overrides:
virtual void OnHitSolidBlock(const Vector3d & a_HitPos, char a_HitFace) override;
+ virtual void OnHitEntity(cEntity & a_EntityHit, const Vector3d & a_HitPos) override;
+ // TODO: Deflecting the fireballs by arrow- or sword- hits
+
// tolua_begin
} ;
@@ -245,6 +274,34 @@ protected:
+class cFireChargeEntity :
+ public cProjectileEntity
+{
+ typedef cProjectileEntity super;
+
+public:
+
+ // tolua_end
+
+ CLASS_PROTODEF(cFireChargeEntity);
+
+ cFireChargeEntity(cEntity * a_Creator, double a_X, double a_Y, double a_Z, const Vector3d & a_Speed);
+
+protected:
+
+ void Explode(int a_BlockX, int a_BlockY, int a_BlockZ);
+
+ // cProjectileEntity overrides:
+ virtual void OnHitSolidBlock(const Vector3d & a_HitPos, char a_HitFace) override;
+ virtual void OnHitEntity(cEntity & a_EntityHit, const Vector3d & a_HitPos) override;
+
+ // tolua_begin
+
+} ;
+
+
+
+
// tolua_end