summaryrefslogtreecommitdiffstats
path: root/src/Entities/Entity.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-07-17 11:01:26 +0200
committermadmaxoft <github@xoft.cz>2014-07-17 11:01:26 +0200
commit7d0fc85d0079febec4af110c4d6404944d1f3eb0 (patch)
treea2f21d0a5575631c959f5e48652e387e72d8c08b /src/Entities/Entity.cpp
parentReformatted cItemPotionHandler. (diff)
parentMerge pull request #1193 from mc-server/deathmessages (diff)
downloadcuberite-7d0fc85d0079febec4af110c4d6404944d1f3eb0.tar
cuberite-7d0fc85d0079febec4af110c4d6404944d1f3eb0.tar.gz
cuberite-7d0fc85d0079febec4af110c4d6404944d1f3eb0.tar.bz2
cuberite-7d0fc85d0079febec4af110c4d6404944d1f3eb0.tar.lz
cuberite-7d0fc85d0079febec4af110c4d6404944d1f3eb0.tar.xz
cuberite-7d0fc85d0079febec4af110c4d6404944d1f3eb0.tar.zst
cuberite-7d0fc85d0079febec4af110c4d6404944d1f3eb0.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 670e8420a..c6dc1fca3 100644
--- a/src/Entities/Entity.cpp
+++ b/src/Entities/Entity.cpp
@@ -372,7 +372,7 @@ bool cEntity::DoTakeDamage(TakeDamageInfo & a_TDI)
if (m_Health <= 0)
{
- KilledBy(a_TDI.Attacker);
+ KilledBy(a_TDI);
if (a_TDI.Attacker != NULL)
{
@@ -529,11 +529,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.Attacker, a_TDI);
if (m_Health > 0)
{
@@ -543,7 +543,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);