diff options
author | Mattes D <github@xoft.cz> | 2014-10-21 21:25:52 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-10-21 21:25:52 +0200 |
commit | 0c0c762412922b784aaf154b51a8d5d547d3f86f (patch) | |
tree | 9e4b70bec26c126ff874e74bf1546df58e1513f1 /src/Entities/ThrownEggEntity.h | |
parent | Merged branch 'master' of git://github.com/sriehl/MCServer (diff) | |
download | cuberite-0c0c762412922b784aaf154b51a8d5d547d3f86f.tar cuberite-0c0c762412922b784aaf154b51a8d5d547d3f86f.tar.gz cuberite-0c0c762412922b784aaf154b51a8d5d547d3f86f.tar.bz2 cuberite-0c0c762412922b784aaf154b51a8d5d547d3f86f.tar.lz cuberite-0c0c762412922b784aaf154b51a8d5d547d3f86f.tar.xz cuberite-0c0c762412922b784aaf154b51a8d5d547d3f86f.tar.zst cuberite-0c0c762412922b784aaf154b51a8d5d547d3f86f.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Entities/ThrownEggEntity.h | 34 |
1 files changed, 14 insertions, 20 deletions
diff --git a/src/Entities/ThrownEggEntity.h b/src/Entities/ThrownEggEntity.h index a0b7d5340..6ffedf5b5 100644 --- a/src/Entities/ThrownEggEntity.h +++ b/src/Entities/ThrownEggEntity.h @@ -1,6 +1,11 @@ -// -// ThrownEggEntity.h -// + +// ThrownEggEntity.h + +// Declares the cThrownEggEntity class representing a regular thrown egg + + + + #pragma once @@ -29,23 +34,8 @@ protected: // cProjectileEntity overrides: virtual void OnHitSolidBlock(const Vector3d & a_HitPos, eBlockFace a_HitFace) override; - virtual void OnHitEntity (cEntity & a_EntityHit, const Vector3d & a_HitPos) override; - virtual void Tick (float a_Dt, cChunk & a_Chunk) override - { - if (m_DestroyTimer > 0) - { - m_DestroyTimer--; - if (m_DestroyTimer == 0) - { - Destroy(); - return; - } - } - else - { - super::Tick(a_Dt, a_Chunk); - } - } + virtual void OnHitEntity(cEntity & a_EntityHit, const Vector3d & a_HitPos) override; + virtual void Tick(float a_Dt, cChunk & a_Chunk) override; // Randomly decides whether to spawn a chicken where the egg lands. void TrySpawnChicken(const Vector3d & a_HitPos); @@ -56,3 +46,7 @@ private: int m_DestroyTimer; } ; // tolua_export + + + + |