summaryrefslogtreecommitdiffstats
path: root/src/Entities/ThrownEnderPearlEntity.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-07-04 17:49:24 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-07-04 17:49:24 +0200
commitf4e3c01a710a2cc5118807a65f8d27519a19ef37 (patch)
treeb01db2464263a6425ed39195f574523e7707fa5b /src/Entities/ThrownEnderPearlEntity.cpp
parentEps comparison (diff)
downloadcuberite-f4e3c01a710a2cc5118807a65f8d27519a19ef37.tar
cuberite-f4e3c01a710a2cc5118807a65f8d27519a19ef37.tar.gz
cuberite-f4e3c01a710a2cc5118807a65f8d27519a19ef37.tar.bz2
cuberite-f4e3c01a710a2cc5118807a65f8d27519a19ef37.tar.lz
cuberite-f4e3c01a710a2cc5118807a65f8d27519a19ef37.tar.xz
cuberite-f4e3c01a710a2cc5118807a65f8d27519a19ef37.tar.zst
cuberite-f4e3c01a710a2cc5118807a65f8d27519a19ef37.zip
Diffstat (limited to 'src/Entities/ThrownEnderPearlEntity.cpp')
-rw-r--r--src/Entities/ThrownEnderPearlEntity.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Entities/ThrownEnderPearlEntity.cpp b/src/Entities/ThrownEnderPearlEntity.cpp
index a3ee23389..96dd41ee6 100644
--- a/src/Entities/ThrownEnderPearlEntity.cpp
+++ b/src/Entities/ThrownEnderPearlEntity.cpp
@@ -46,10 +46,12 @@ void cThrownEnderPearlEntity::OnHitEntity(cEntity & a_EntityHit, const Vector3d
void cThrownEnderPearlEntity::TeleportCreator(const Vector3d & a_HitPos)
{
+ cEntity * Creator = GetCreator();
+
// Teleport the creator here, make them take 5 damage:
- if (m_Creator != NULL)
+ if (Creator != NULL)
{
- m_Creator->TeleportToCoords(a_HitPos.x, a_HitPos.y + 0.2, a_HitPos.z);
- m_Creator->TakeDamage(dtEnderPearl, this, 5, 0);
+ Creator->TeleportToCoords(a_HitPos.x, a_HitPos.y + 0.2, a_HitPos.z);
+ Creator->TakeDamage(dtEnderPearl, this, 5, 0);
}
}