summaryrefslogtreecommitdiffstats
path: root/source/Mobs/Monster.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-07-01 12:39:56 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-07-01 12:39:56 +0200
commit37276a4430e26f5b3ab56e07d5f30a194f75982e (patch)
tree95ba9a0a151dc9f4111d8b99e8af728993daa783 /source/Mobs/Monster.cpp
parentChanged the crafting recipe for book to match vanilla since 1.3.1 (fix contributed by mgueydan) (diff)
downloadcuberite-37276a4430e26f5b3ab56e07d5f30a194f75982e.tar
cuberite-37276a4430e26f5b3ab56e07d5f30a194f75982e.tar.gz
cuberite-37276a4430e26f5b3ab56e07d5f30a194f75982e.tar.bz2
cuberite-37276a4430e26f5b3ab56e07d5f30a194f75982e.tar.lz
cuberite-37276a4430e26f5b3ab56e07d5f30a194f75982e.tar.xz
cuberite-37276a4430e26f5b3ab56e07d5f30a194f75982e.tar.zst
cuberite-37276a4430e26f5b3ab56e07d5f30a194f75982e.zip
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;
}