summaryrefslogtreecommitdiffstats
path: root/src/Entities/ThrownEggEntity.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-10-21 21:25:52 +0200
committerMattes D <github@xoft.cz>2014-10-21 21:25:52 +0200
commit0c0c762412922b784aaf154b51a8d5d547d3f86f (patch)
tree9e4b70bec26c126ff874e74bf1546df58e1513f1 /src/Entities/ThrownEggEntity.cpp
parentMerged branch 'master' of git://github.com/sriehl/MCServer (diff)
downloadcuberite-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.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/Entities/ThrownEggEntity.cpp b/src/Entities/ThrownEggEntity.cpp
index 5ae85bee8..24c946a9c 100644
--- a/src/Entities/ThrownEggEntity.cpp
+++ b/src/Entities/ThrownEggEntity.cpp
@@ -44,6 +44,27 @@ void cThrownEggEntity::OnHitEntity(cEntity & a_EntityHit, const Vector3d & a_Hit
+void cThrownEggEntity::Tick(float a_Dt, cChunk & a_Chunk)
+{
+ if (m_DestroyTimer > 0)
+ {
+ m_DestroyTimer--;
+ if (m_DestroyTimer == 0)
+ {
+ Destroy();
+ return;
+ }
+ }
+ else
+ {
+ super::Tick(a_Dt, a_Chunk);
+ }
+}
+
+
+
+
+
void cThrownEggEntity::TrySpawnChicken(const Vector3d & a_HitPos)
{
if (m_World->GetTickRandomNumber(7) == 1)