summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Monster.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/Mobs/Monster.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/Mobs/Monster.cpp')
-rw-r--r--src/Mobs/Monster.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Mobs/Monster.cpp b/src/Mobs/Monster.cpp
index b8040084a..e36634c73 100644
--- a/src/Mobs/Monster.cpp
+++ b/src/Mobs/Monster.cpp
@@ -493,9 +493,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, GetPosX(), GetPosY(), GetPosZ(), 1.0f, 0.8f);
@@ -559,7 +559,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);
}