summaryrefslogtreecommitdiffstats
path: root/src/Entities/ProjectileEntity.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-03-10 19:59:11 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-03-10 19:59:11 +0100
commite672988577e2c894d3bb59ed7f2d5459bca8ef86 (patch)
tree2cd9c62c1217a41b7f75e911f6a6cc42c7b3d858 /src/Entities/ProjectileEntity.h
parentMerge branch 'master' into awesometnt (diff)
parentMerge pull request #788 from worktycho/warnings (diff)
downloadcuberite-e672988577e2c894d3bb59ed7f2d5459bca8ef86.tar
cuberite-e672988577e2c894d3bb59ed7f2d5459bca8ef86.tar.gz
cuberite-e672988577e2c894d3bb59ed7f2d5459bca8ef86.tar.bz2
cuberite-e672988577e2c894d3bb59ed7f2d5459bca8ef86.tar.lz
cuberite-e672988577e2c894d3bb59ed7f2d5459bca8ef86.tar.xz
cuberite-e672988577e2c894d3bb59ed7f2d5459bca8ef86.tar.zst
cuberite-e672988577e2c894d3bb59ed7f2d5459bca8ef86.zip
Diffstat (limited to 'src/Entities/ProjectileEntity.h')
-rw-r--r--src/Entities/ProjectileEntity.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/Entities/ProjectileEntity.h b/src/Entities/ProjectileEntity.h
index e80592999..fac592d16 100644
--- a/src/Entities/ProjectileEntity.h
+++ b/src/Entities/ProjectileEntity.h
@@ -46,7 +46,7 @@ public:
cProjectileEntity(eKind a_Kind, cEntity * a_Creator, double a_X, double a_Y, double a_Z, double a_Width, double a_Height);
cProjectileEntity(eKind a_Kind, cEntity * a_Creator, const Vector3d & a_Pos, const Vector3d & a_Speed, double a_Width, double a_Height);
- static cProjectileEntity * Create(eKind a_Kind, cEntity * a_Creator, double a_X, double a_Y, double a_Z, const Vector3d * a_Speed = NULL);
+ static cProjectileEntity * Create(eKind a_Kind, cEntity * a_Creator, double a_X, double a_Y, double a_Z, const cItem & a_Item, const Vector3d * a_Speed = NULL);
/// Called by the physics blocktracer when the entity hits a solid block, the hit position and the face hit (BLOCK_FACE_) is given
virtual void OnHitSolidBlock(const Vector3d & a_HitPos, eBlockFace a_HitFace);
@@ -305,13 +305,19 @@ public:
CLASS_PROTODEF(cFireworkEntity);
- cFireworkEntity(cEntity * a_Creator, double a_X, double a_Y, double a_Z);
+ cFireworkEntity(cEntity * a_Creator, double a_X, double a_Y, double a_Z, const cItem & a_Item);
+ const cItem & GetItem(void) const { return m_FireworkItem; }
protected:
// cProjectileEntity overrides:
- virtual void OnHitSolidBlock(const Vector3d & a_HitPos, eBlockFace a_HitFace) override;
virtual void HandlePhysics(float a_Dt, cChunk & a_Chunk) override;
+ virtual void Tick(float a_Dt, cChunk & a_Chunk) override;
+
+private:
+
+ int m_ExplodeTimer;
+ cItem m_FireworkItem;
// tolua_begin