summaryrefslogtreecommitdiffstats
path: root/src/Entities/ProjectileEntity.cpp
diff options
context:
space:
mode:
authorarchshift <admin@archshift.com>2014-04-25 14:39:35 +0200
committerarchshift <admin@archshift.com>2014-04-25 14:39:35 +0200
commitcb7f1ee4bbf726b5b57fe8d1960bb7d03dc1e87a (patch)
treefb0d3c5f0830c75781c5e048a89507eeed25deec /src/Entities/ProjectileEntity.cpp
parentChicken eggs and ender pearls can hit entities. (diff)
downloadcuberite-cb7f1ee4bbf726b5b57fe8d1960bb7d03dc1e87a.tar
cuberite-cb7f1ee4bbf726b5b57fe8d1960bb7d03dc1e87a.tar.gz
cuberite-cb7f1ee4bbf726b5b57fe8d1960bb7d03dc1e87a.tar.bz2
cuberite-cb7f1ee4bbf726b5b57fe8d1960bb7d03dc1e87a.tar.lz
cuberite-cb7f1ee4bbf726b5b57fe8d1960bb7d03dc1e87a.tar.xz
cuberite-cb7f1ee4bbf726b5b57fe8d1960bb7d03dc1e87a.tar.zst
cuberite-cb7f1ee4bbf726b5b57fe8d1960bb7d03dc1e87a.zip
Diffstat (limited to 'src/Entities/ProjectileEntity.cpp')
-rw-r--r--src/Entities/ProjectileEntity.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Entities/ProjectileEntity.cpp b/src/Entities/ProjectileEntity.cpp
index 2725822f3..89b833abf 100644
--- a/src/Entities/ProjectileEntity.cpp
+++ b/src/Entities/ProjectileEntity.cpp
@@ -440,6 +440,7 @@ cArrowEntity::cArrowEntity(cPlayer & a_Player, double a_Force) :
m_IsCritical((a_Force >= 1)),
m_Timer(0),
m_HitGroundTimer(0),
+ m_HasTeleported(false),
m_bIsCollected(false),
m_HitBlockPos(0, 0, 0)
{
@@ -611,7 +612,7 @@ cThrownEggEntity::cThrownEggEntity(cEntity * a_Creator, double a_X, double a_Y,
void cThrownEggEntity::OnHitSolidBlock(const Vector3d & a_HitPos, eBlockFace a_HitFace)
{
- TryForChicken(a_HitPos);
+ TrySpawnChicken(a_HitPos);
Destroy();
}
@@ -625,7 +626,7 @@ void cThrownEggEntity::OnHitEntity(cEntity & a_EntityHit, const Vector3d & a_Hit
int TotalDamage = 0;
// TODO: If entity is Ender Crystal, destroy it
- TryForChicken(a_HitPos);
+ TrySpawnChicken(a_HitPos);
a_EntityHit.TakeDamage(dtRangedAttack, this, TotalDamage, 1);
Destroy(true);
@@ -635,7 +636,7 @@ void cThrownEggEntity::OnHitEntity(cEntity & a_EntityHit, const Vector3d & a_Hit
-void cThrownEggEntity::TryForChicken(const Vector3d & a_HitPos)
+void cThrownEggEntity::TrySpawnChicken(const Vector3d & a_HitPos)
{
if (m_World->GetTickRandomNumber(7) == 1)
{