1
0

Creator not user.

This commit is contained in:
archshift 2014-04-25 06:26:08 -07:00
parent 256691461b
commit 8aa82d048d
2 changed files with 5 additions and 5 deletions

View File

@ -671,7 +671,7 @@ cThrownEnderPearlEntity::cThrownEnderPearlEntity(cEntity * a_Creator, double a_X
void cThrownEnderPearlEntity::OnHitSolidBlock(const Vector3d & a_HitPos, eBlockFace a_HitFace) void cThrownEnderPearlEntity::OnHitSolidBlock(const Vector3d & a_HitPos, eBlockFace a_HitFace)
{ {
// TODO: Tweak a_HitPos based on block face. // TODO: Tweak a_HitPos based on block face.
TeleportUser(a_HitPos); TeleportCreator(a_HitPos);
Destroy(); Destroy();
} }
@ -685,7 +685,7 @@ void cThrownEnderPearlEntity::OnHitEntity(cEntity & a_EntityHit, const Vector3d
int TotalDamage = 0; int TotalDamage = 0;
// TODO: If entity is Ender Crystal, destroy it // TODO: If entity is Ender Crystal, destroy it
TeleportUser(a_HitPos); TeleportCreator(a_HitPos);
a_EntityHit.TakeDamage(dtRangedAttack, this, TotalDamage, 1); a_EntityHit.TakeDamage(dtRangedAttack, this, TotalDamage, 1);
Destroy(true); Destroy(true);
@ -695,7 +695,7 @@ void cThrownEnderPearlEntity::OnHitEntity(cEntity & a_EntityHit, const Vector3d
void cThrownEnderPearlEntity::TeleportUser(const Vector3d & a_HitPos) void cThrownEnderPearlEntity::TeleportCreator(const Vector3d & a_HitPos)
{ {
// Teleport the creator here, make them take 5 damage: // Teleport the creator here, make them take 5 damage:
if (m_Creator != NULL) if (m_Creator != NULL)

View File

@ -242,8 +242,8 @@ protected:
virtual void OnHitSolidBlock(const Vector3d & a_HitPos, eBlockFace a_HitFace) override; virtual void OnHitSolidBlock(const Vector3d & a_HitPos, eBlockFace a_HitFace) override;
virtual void OnHitEntity (cEntity & a_EntityHit, const Vector3d & a_HitPos) override; virtual void OnHitEntity (cEntity & a_EntityHit, const Vector3d & a_HitPos) override;
// Teleports the user where the ender pearl lands. // Teleports the creator where the ender pearl lands.
void TeleportUser(const Vector3d & a_HitPos); void TeleportCreator(const Vector3d & a_HitPos);
// tolua_begin // tolua_begin