summaryrefslogtreecommitdiffstats
path: root/src/Entities/ThrownEnderPearlEntity.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-11-04 22:53:37 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-11-04 22:53:37 +0100
commit3d00e52d42edc69eb777c90c6e6f479a5a473598 (patch)
tree9ed2245653c77b7de86678c345254fe70342126e /src/Entities/ThrownEnderPearlEntity.cpp
parentMore player speed/position overrides (diff)
downloadcuberite-3d00e52d42edc69eb777c90c6e6f479a5a473598.tar
cuberite-3d00e52d42edc69eb777c90c6e6f479a5a473598.tar.gz
cuberite-3d00e52d42edc69eb777c90c6e6f479a5a473598.tar.bz2
cuberite-3d00e52d42edc69eb777c90c6e6f479a5a473598.tar.lz
cuberite-3d00e52d42edc69eb777c90c6e6f479a5a473598.tar.xz
cuberite-3d00e52d42edc69eb777c90c6e6f479a5a473598.tar.zst
cuberite-3d00e52d42edc69eb777c90c6e6f479a5a473598.zip
Diffstat (limited to 'src/Entities/ThrownEnderPearlEntity.cpp')
-rw-r--r--src/Entities/ThrownEnderPearlEntity.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Entities/ThrownEnderPearlEntity.cpp b/src/Entities/ThrownEnderPearlEntity.cpp
index c7407e6ae..555c10688 100644
--- a/src/Entities/ThrownEnderPearlEntity.cpp
+++ b/src/Entities/ThrownEnderPearlEntity.cpp
@@ -7,11 +7,10 @@
-cThrownEnderPearlEntity::cThrownEnderPearlEntity(cEntity * a_Creator, double a_X, double a_Y, double a_Z, const Vector3d & a_Speed) :
- super(pkEnderPearl, a_Creator, a_X, a_Y, a_Z, 0.25, 0.25),
+cThrownEnderPearlEntity::cThrownEnderPearlEntity(CreateEntityInfo a_Info, cEntity * a_Creator) :
+ super(a_Info, pkEnderPearl, a_Creator, 0.25, 0.25),
m_DestroyTimer(-1)
{
- SetSpeed(a_Speed);
}
@@ -64,7 +63,7 @@ void cThrownEnderPearlEntity::TeleportCreator(const Vector3d & a_HitPos)
virtual bool Item(cPlayer * a_Entity) override
{
// Teleport the creator here, make them take 5 damage:
- a_Entity->TeleportToCoords(m_HitPos.x, m_HitPos.y + 0.2, m_HitPos.z);
+ a_Entity->SetPosition(m_HitPos, true);
a_Entity->TakeDamage(dtEnderPearl, m_Attacker, 5, 0);
return true;
}