summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Monster.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-05-18 22:30:34 +0200
committerMattes D <github@xoft.cz>2014-05-18 22:30:34 +0200
commitac005681839134018f0162cfb8cb1453e11cbb46 (patch)
tree41cc966732262c0a8f5441932b758344856d6259 /src/Mobs/Monster.cpp
parentMerge pull request #1005 from SphinxC0re/LoadPluginfolder (diff)
parentFixes (diff)
downloadcuberite-ac005681839134018f0162cfb8cb1453e11cbb46.tar
cuberite-ac005681839134018f0162cfb8cb1453e11cbb46.tar.gz
cuberite-ac005681839134018f0162cfb8cb1453e11cbb46.tar.bz2
cuberite-ac005681839134018f0162cfb8cb1453e11cbb46.tar.lz
cuberite-ac005681839134018f0162cfb8cb1453e11cbb46.tar.xz
cuberite-ac005681839134018f0162cfb8cb1453e11cbb46.tar.zst
cuberite-ac005681839134018f0162cfb8cb1453e11cbb46.zip
Diffstat (limited to 'src/Mobs/Monster.cpp')
-rw-r--r--src/Mobs/Monster.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Mobs/Monster.cpp b/src/Mobs/Monster.cpp
index 5832edb9f..a9ca7a2fa 100644
--- a/src/Mobs/Monster.cpp
+++ b/src/Mobs/Monster.cpp
@@ -466,8 +466,10 @@ bool cMonster::DoTakeDamage(TakeDamageInfo & a_TDI)
return false;
}
- if((m_SoundHurt != "") && (m_Health > 0))
+ if (!m_SoundHurt.empty() && (m_Health > 0))
+ {
m_World->BroadcastSoundEffect(m_SoundHurt, (int)(GetPosX() * 8), (int)(GetPosY() * 8), (int)(GetPosZ() * 8), 1.0f, 0.8f);
+ }
if (a_TDI.Attacker != NULL)
{