diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-07-09 10:50:38 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-07-09 10:50:38 +0200 |
commit | 372dbbb994a1414369fe38367d458a0c32866a79 (patch) | |
tree | 5cd564fbb0c4b7c0b47f3cb64594c34f9361f1dc /src/Entities/ThrownSnowballEntity.cpp | |
parent | Updated generator prefabs to current Gallery contents. (diff) | |
parent | Added extra space before comments (diff) | |
download | cuberite-372dbbb994a1414369fe38367d458a0c32866a79.tar cuberite-372dbbb994a1414369fe38367d458a0c32866a79.tar.gz cuberite-372dbbb994a1414369fe38367d458a0c32866a79.tar.bz2 cuberite-372dbbb994a1414369fe38367d458a0c32866a79.tar.lz cuberite-372dbbb994a1414369fe38367d458a0c32866a79.tar.xz cuberite-372dbbb994a1414369fe38367d458a0c32866a79.tar.zst cuberite-372dbbb994a1414369fe38367d458a0c32866a79.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Entities/ThrownSnowballEntity.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Entities/ThrownSnowballEntity.cpp b/src/Entities/ThrownSnowballEntity.cpp index cefc3433c..d94e75898 100644 --- a/src/Entities/ThrownSnowballEntity.cpp +++ b/src/Entities/ThrownSnowballEntity.cpp @@ -8,7 +8,8 @@ cThrownSnowballEntity::cThrownSnowballEntity(cEntity * a_Creator, double a_X, double a_Y, double a_Z, const Vector3d & a_Speed) : - super(pkSnowball, a_Creator, a_X, a_Y, a_Z, 0.25, 0.25) + super(pkSnowball, a_Creator, a_X, a_Y, a_Z, 0.25, 0.25), + m_DestroyTimer(-1) { SetSpeed(a_Speed); } @@ -19,7 +20,7 @@ cThrownSnowballEntity::cThrownSnowballEntity(cEntity * a_Creator, double a_X, do void cThrownSnowballEntity::OnHitSolidBlock(const Vector3d & a_HitPos, eBlockFace a_HitFace) { - Destroy(); + m_DestroyTimer = 2; } @@ -40,5 +41,5 @@ void cThrownSnowballEntity::OnHitEntity(cEntity & a_EntityHit, const Vector3d & // TODO: If entity is Ender Crystal, destroy it a_EntityHit.TakeDamage(dtRangedAttack, this, TotalDamage, 1); - Destroy(true); + m_DestroyTimer = 5; } |