summaryrefslogtreecommitdiffstats
path: root/source/Mobs/Monster.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Mobs/Monster.cpp')
-rw-r--r--source/Mobs/Monster.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/source/Mobs/Monster.cpp b/source/Mobs/Monster.cpp
index 0176175e9..706649cb2 100644
--- a/source/Mobs/Monster.cpp
+++ b/source/Mobs/Monster.cpp
@@ -22,8 +22,8 @@
-cMonster::cMonster(const AString & a_ConfigName, char a_ProtocolMobType, const AString & a_SoundHurt, const AString & a_SoundDeath)
- : super(etMob)
+cMonster::cMonster(const AString & a_ConfigName, char a_ProtocolMobType, const AString & a_SoundHurt, const AString & a_SoundDeath, double a_Width, double a_Height)
+ : super(etMob, a_Width, a_Height)
, m_Target(NULL)
, m_bMovingToDestination(false)
, m_DestinationTime( 0 )
@@ -204,10 +204,13 @@ void cMonster::DoTakeDamage(TakeDamageInfo & a_TDI)
-void cMonster::KilledBy(cPawn * a_Killer)
+void cMonster::KilledBy(cEntity * a_Killer)
{
super::KilledBy(a_Killer);
- if(m_SoundHurt != "") m_World->BroadcastSoundEffect(m_SoundDeath, (int)(GetPosX() * 8), (int)(GetPosY() * 8), (int)(GetPosZ() * 8), 1.0f, 0.8f);
+ if (m_SoundHurt != "")
+ {
+ m_World->BroadcastSoundEffect(m_SoundDeath, (int)(GetPosX() * 8), (int)(GetPosY() * 8), (int)(GetPosZ() * 8), 1.0f, 0.8f);
+ }
m_DestroyTimer = 0;
}