1
0

Tailored death messages

This commit is contained in:
Tiger Wang
2014-07-04 10:55:09 +01:00
parent 39fff19955
commit a0d2df9327
20 changed files with 61 additions and 40 deletions

View File

@@ -492,9 +492,9 @@ bool cMonster::DoTakeDamage(TakeDamageInfo & a_TDI)
void cMonster::KilledBy(cEntity * a_Killer)
void cMonster::KilledBy(TakeDamageInfo & a_TDI)
{
super::KilledBy(a_Killer);
super::KilledBy(a_TDI);
if (m_SoundHurt != "")
{
m_World->BroadcastSoundEffect(m_SoundDeath, (int)(GetPosX() * 8), (int)(GetPosY() * 8), (int)(GetPosZ() * 8), 1.0f, 0.8f);
@@ -558,7 +558,7 @@ void cMonster::KilledBy(cEntity * a_Killer)
break;
}
}
if ((a_Killer != NULL) && (!IsBaby()))
if ((a_TDI.Attacker != NULL) && (!IsBaby()))
{
m_World->SpawnExperienceOrb(GetPosX(), GetPosY(), GetPosZ(), Reward);
}