summaryrefslogtreecommitdiffstats
path: root/src/Entities/ThrownSnowballEntity.cpp
diff options
context:
space:
mode:
authorLogicParrot <LogicParrot@users.noreply.github.com>2016-01-11 20:34:41 +0100
committerLogicParrot <LogicParrot@users.noreply.github.com>2016-01-12 10:47:59 +0100
commit359e772dee0ef4595c8ad982f17e13725f255219 (patch)
tree4c784bee23613af41e0dda909b90c1c2fd7140a6 /src/Entities/ThrownSnowballEntity.cpp
parentMerge pull request #2848 from Nakkar/master (diff)
downloadcuberite-359e772dee0ef4595c8ad982f17e13725f255219.tar
cuberite-359e772dee0ef4595c8ad982f17e13725f255219.tar.gz
cuberite-359e772dee0ef4595c8ad982f17e13725f255219.tar.bz2
cuberite-359e772dee0ef4595c8ad982f17e13725f255219.tar.lz
cuberite-359e772dee0ef4595c8ad982f17e13725f255219.tar.xz
cuberite-359e772dee0ef4595c8ad982f17e13725f255219.tar.zst
cuberite-359e772dee0ef4595c8ad982f17e13725f255219.zip
Diffstat (limited to 'src/Entities/ThrownSnowballEntity.cpp')
-rw-r--r--src/Entities/ThrownSnowballEntity.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Entities/ThrownSnowballEntity.cpp b/src/Entities/ThrownSnowballEntity.cpp
index b28205d44..ab5429011 100644
--- a/src/Entities/ThrownSnowballEntity.cpp
+++ b/src/Entities/ThrownSnowballEntity.cpp
@@ -29,6 +29,8 @@ void cThrownSnowballEntity::OnHitSolidBlock(const Vector3d & a_HitPos, eBlockFac
void cThrownSnowballEntity::OnHitEntity(cEntity & a_EntityHit, const Vector3d & a_HitPos)
{
+ super::OnHitEntity(a_EntityHit, a_HitPos);
+
int TotalDamage = 0;
if (a_EntityHit.IsMob())
{
@@ -40,7 +42,7 @@ void cThrownSnowballEntity::OnHitEntity(cEntity & a_EntityHit, const Vector3d &
}
// TODO: If entity is Ender Crystal, destroy it
a_EntityHit.TakeDamage(dtRangedAttack, this, TotalDamage, 1);
-
+
m_DestroyTimer = 5;
}