Merge branch 'master' into potions
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user