summaryrefslogtreecommitdiffstats
path: root/source/Entities/ProjectileEntity.h
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-09-07 18:53:14 +0200
committermadmaxoft <github@xoft.cz>2013-09-07 18:53:14 +0200
commit06b01af017d373377a58604fa36a1607323fa6dc (patch)
tree04ec095164e03b0fd010b8237899e7bca7f3789b /source/Entities/ProjectileEntity.h
parentDebuggers plugin: Removed unneeded global (diff)
downloadcuberite-06b01af017d373377a58604fa36a1607323fa6dc.tar
cuberite-06b01af017d373377a58604fa36a1607323fa6dc.tar.gz
cuberite-06b01af017d373377a58604fa36a1607323fa6dc.tar.bz2
cuberite-06b01af017d373377a58604fa36a1607323fa6dc.tar.lz
cuberite-06b01af017d373377a58604fa36a1607323fa6dc.tar.xz
cuberite-06b01af017d373377a58604fa36a1607323fa6dc.tar.zst
cuberite-06b01af017d373377a58604fa36a1607323fa6dc.zip
Diffstat (limited to 'source/Entities/ProjectileEntity.h')
-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