diff options
author | Mattes D <github@xoft.cz> | 2014-07-17 10:12:22 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-07-17 10:12:22 +0200 |
commit | 98244e96d1a810bea24a6c8463f9beb535ad2daf (patch) | |
tree | a57dd6f82ad46ee02811f4f77bcd56a50c5b8865 /src/Entities/Entity.cpp | |
parent | Another fix for excessive food drain (diff) | |
parent | Resolved backwards compatibility issues (diff) | |
download | cuberite-98244e96d1a810bea24a6c8463f9beb535ad2daf.tar cuberite-98244e96d1a810bea24a6c8463f9beb535ad2daf.tar.gz cuberite-98244e96d1a810bea24a6c8463f9beb535ad2daf.tar.bz2 cuberite-98244e96d1a810bea24a6c8463f9beb535ad2daf.tar.lz cuberite-98244e96d1a810bea24a6c8463f9beb535ad2daf.tar.xz cuberite-98244e96d1a810bea24a6c8463f9beb535ad2daf.tar.zst cuberite-98244e96d1a810bea24a6c8463f9beb535ad2daf.zip |
Diffstat (limited to 'src/Entities/Entity.cpp')
-rw-r--r-- | src/Entities/Entity.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Entities/Entity.cpp b/src/Entities/Entity.cpp index 26823924f..9a343b5ef 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.Attacker, 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); |