diff options
author | Howaner <franzi.moos@googlemail.com> | 2014-04-26 00:32:30 +0200 |
---|---|---|
committer | Howaner <franzi.moos@googlemail.com> | 2014-04-26 00:32:30 +0200 |
commit | 7e76f030aa2e6d39ac7fe9fb6a8a3db44bf3dd5f (patch) | |
tree | c06c0e15699d0a120820176fe979dcbceb63b8b0 /src/Mobs/Monster.cpp | |
parent | Merge pull request #935 from archshift/projectile-fixes (diff) | |
download | cuberite-7e76f030aa2e6d39ac7fe9fb6a8a3db44bf3dd5f.tar cuberite-7e76f030aa2e6d39ac7fe9fb6a8a3db44bf3dd5f.tar.gz cuberite-7e76f030aa2e6d39ac7fe9fb6a8a3db44bf3dd5f.tar.bz2 cuberite-7e76f030aa2e6d39ac7fe9fb6a8a3db44bf3dd5f.tar.lz cuberite-7e76f030aa2e6d39ac7fe9fb6a8a3db44bf3dd5f.tar.xz cuberite-7e76f030aa2e6d39ac7fe9fb6a8a3db44bf3dd5f.tar.zst cuberite-7e76f030aa2e6d39ac7fe9fb6a8a3db44bf3dd5f.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Mobs/Monster.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Mobs/Monster.cpp b/src/Mobs/Monster.cpp index eb8480268..9e4c2ba25 100644 --- a/src/Mobs/Monster.cpp +++ b/src/Mobs/Monster.cpp @@ -457,9 +457,12 @@ int cMonster::FindFirstNonAirBlockPosition(double a_PosX, double a_PosZ) -void cMonster::DoTakeDamage(TakeDamageInfo & a_TDI) +bool cMonster::DoTakeDamage(TakeDamageInfo & a_TDI) { - super::DoTakeDamage(a_TDI); + if (!super::DoTakeDamage(a_TDI)) + { + return false; + } if((m_SoundHurt != "") && (m_Health > 0)) m_World->BroadcastSoundEffect(m_SoundHurt, (int)(GetPosX() * 8), (int)(GetPosY() * 8), (int)(GetPosZ() * 8), 1.0f, 0.8f); @@ -468,6 +471,7 @@ void cMonster::DoTakeDamage(TakeDamageInfo & a_TDI) { m_Target = a_TDI.Attacker; } + return true; } |