summaryrefslogtreecommitdiffstats
path: root/source/Entities/ProjectileEntity.h
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-11-13 11:08:51 +0100
committermadmaxoft <github@xoft.cz>2013-11-13 11:08:51 +0100
commit293051eca89351181f11443e1785617ab58459c8 (patch)
tree50c637b3c2ac3f1848610623156ce96be1b91be5 /source/Entities/ProjectileEntity.h
parentcWindow: Fixed item dupe glitch with painting (#278) (diff)
parentBundled fixes [SEE DESC] (diff)
downloadcuberite-293051eca89351181f11443e1785617ab58459c8.tar
cuberite-293051eca89351181f11443e1785617ab58459c8.tar.gz
cuberite-293051eca89351181f11443e1785617ab58459c8.tar.bz2
cuberite-293051eca89351181f11443e1785617ab58459c8.tar.lz
cuberite-293051eca89351181f11443e1785617ab58459c8.tar.xz
cuberite-293051eca89351181f11443e1785617ab58459c8.tar.zst
cuberite-293051eca89351181f11443e1785617ab58459c8.zip
Diffstat (limited to 'source/Entities/ProjectileEntity.h')
-rw-r--r--source/Entities/ProjectileEntity.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/source/Entities/ProjectileEntity.h b/source/Entities/ProjectileEntity.h
index 547aa174e..28dd76935 100644
--- a/source/Entities/ProjectileEntity.h
+++ b/source/Entities/ProjectileEntity.h
@@ -53,6 +53,9 @@ public:
/// Called by the physics blocktracer when the entity hits another entity
virtual void OnHitEntity(cEntity & a_EntityHit, const Vector3d & a_HitPos) {}
+ /// Called by Chunk when the projectile is eligible for player collection
+ virtual void CollectedBy(cPlayer * a_Dest);
+
// tolua_begin
/// Returns the kind of the projectile (fast class identification)
@@ -153,9 +156,20 @@ protected:
/// If true, the arrow deals more damage
bool m_IsCritical;
+ /// Timer for pickup collection animation or five minute timeout
+ float m_Timer;
+
+ /// If true, the arrow is in the process of being collected - don't go to anyone else
+ bool m_bIsCollected;
+
+ /// Stores the block position that arrow is lodged into, sets m_IsInGround to false if it becomes air
+ Vector3i m_HitBlockPos;
+
// cProjectileEntity overrides:
virtual void OnHitSolidBlock(const Vector3d & a_HitPos, char a_HitFace) override;
virtual void OnHitEntity(cEntity & a_EntityHit, const Vector3d & a_HitPos) override;
+ virtual void CollectedBy(cPlayer * a_Player) override;
+ virtual void Tick(float a_Dt, cChunk & a_Chunk) override;
// tolua_begin
} ;