summaryrefslogtreecommitdiffstats
path: root/src/Entities/Entity.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-07-04 11:55:09 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-07-04 11:55:09 +0200
commita0d2df93272a6108f8c568e1eed665a1da5cb7ed (patch)
tree73ce9334f32e068247665e5d7200f841f9f07009 /src/Entities/Entity.cpp
parentMerge pull request #1138 from mc-server/enderchest (diff)
downloadcuberite-a0d2df93272a6108f8c568e1eed665a1da5cb7ed.tar
cuberite-a0d2df93272a6108f8c568e1eed665a1da5cb7ed.tar.gz
cuberite-a0d2df93272a6108f8c568e1eed665a1da5cb7ed.tar.bz2
cuberite-a0d2df93272a6108f8c568e1eed665a1da5cb7ed.tar.lz
cuberite-a0d2df93272a6108f8c568e1eed665a1da5cb7ed.tar.xz
cuberite-a0d2df93272a6108f8c568e1eed665a1da5cb7ed.tar.zst
cuberite-a0d2df93272a6108f8c568e1eed665a1da5cb7ed.zip
Diffstat (limited to 'src/Entities/Entity.cpp')
-rw-r--r--src/Entities/Entity.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Entities/Entity.cpp b/src/Entities/Entity.cpp
index 2b256e766..56ef22280 100644
--- a/src/Entities/Entity.cpp
+++ b/src/Entities/Entity.cpp
@@ -368,7 +368,7 @@ bool cEntity::DoTakeDamage(TakeDamageInfo & a_TDI)
if (m_Health <= 0)
{
- KilledBy(a_TDI.Attacker);
+ KilledBy(a_TDI);
if (a_TDI.Attacker != NULL)
{
@@ -524,11 +524,11 @@ double cEntity::GetKnockbackAmountAgainst(const cEntity & a_Receiver)
-void cEntity::KilledBy(cEntity * a_Killer)
+void cEntity::KilledBy(TakeDamageInfo & a_TDI)
{
m_Health = 0;
- cRoot::Get()->GetPluginManager()->CallHookKilling(*this, a_Killer);
+ cRoot::Get()->GetPluginManager()->CallHookKilling(*this, a_TDI);
if (m_Health > 0)
{
@@ -538,7 +538,7 @@ void cEntity::KilledBy(cEntity * a_Killer)
// Drop loot:
cItems Drops;
- GetDrops(Drops, a_Killer);
+ GetDrops(Drops, a_TDI.Attacker);
m_World->SpawnItemPickups(Drops, GetPosX(), GetPosY(), GetPosZ());
m_World->BroadcastEntityStatus(*this, esGenericDead);