summaryrefslogtreecommitdiffstats
path: root/src/Entities/ThrownEggEntity.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-06-22 21:44:01 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-06-22 21:44:01 +0200
commit33cc1f2a50d870b7d264ee5479068f8eee3aa458 (patch)
tree1f2d80ea19911c620b5ce17efe502fcb3bc81da0 /src/Entities/ThrownEggEntity.cpp
parentMerge branch 'master' of https://github.com/mc-server/MCServer (diff)
downloadcuberite-33cc1f2a50d870b7d264ee5479068f8eee3aa458.tar
cuberite-33cc1f2a50d870b7d264ee5479068f8eee3aa458.tar.gz
cuberite-33cc1f2a50d870b7d264ee5479068f8eee3aa458.tar.bz2
cuberite-33cc1f2a50d870b7d264ee5479068f8eee3aa458.tar.lz
cuberite-33cc1f2a50d870b7d264ee5479068f8eee3aa458.tar.xz
cuberite-33cc1f2a50d870b7d264ee5479068f8eee3aa458.tar.zst
cuberite-33cc1f2a50d870b7d264ee5479068f8eee3aa458.zip
Diffstat (limited to '')
-rw-r--r--src/Entities/ThrownEggEntity.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Entities/ThrownEggEntity.cpp b/src/Entities/ThrownEggEntity.cpp
index 224019091..d7eed41e3 100644
--- a/src/Entities/ThrownEggEntity.cpp
+++ b/src/Entities/ThrownEggEntity.cpp
@@ -8,7 +8,8 @@
cThrownEggEntity::cThrownEggEntity(cEntity * a_Creator, double a_X, double a_Y, double a_Z, const Vector3d & a_Speed) :
- super(pkEgg, a_Creator, a_X, a_Y, a_Z, 0.25, 0.25)
+ super(pkEgg, a_Creator, a_X, a_Y, a_Z, 0.25, 0.25),
+ m_DestroyTimer(-1)
{
SetSpeed(a_Speed);
}
@@ -21,7 +22,7 @@ void cThrownEggEntity::OnHitSolidBlock(const Vector3d & a_HitPos, eBlockFace a_H
{
TrySpawnChicken(a_HitPos);
- Destroy();
+ m_DestroyTimer = 5;
}
@@ -36,7 +37,7 @@ void cThrownEggEntity::OnHitEntity(cEntity & a_EntityHit, const Vector3d & a_Hit
TrySpawnChicken(a_HitPos);
a_EntityHit.TakeDamage(dtRangedAttack, this, TotalDamage, 1);
- Destroy(true);
+ m_DestroyTimer = 5;
}