summaryrefslogtreecommitdiffstats
path: root/src/Mobs/PassiveAggressiveMonster.cpp
diff options
context:
space:
mode:
authorarchshift <admin@archshift.com>2014-07-29 22:04:00 +0200
committerarchshift <admin@archshift.com>2014-07-29 22:04:00 +0200
commita9b597087b56b4526a3f6447789ba141568575a1 (patch)
treea08542d77b5668a25ca5e00492577ed6f4d61a9a /src/Mobs/PassiveAggressiveMonster.cpp
parentSpacing fixes and a few more BLOCK_META constants. (diff)
parentSlight cleanup after portals (diff)
downloadcuberite-a9b597087b56b4526a3f6447789ba141568575a1.tar
cuberite-a9b597087b56b4526a3f6447789ba141568575a1.tar.gz
cuberite-a9b597087b56b4526a3f6447789ba141568575a1.tar.bz2
cuberite-a9b597087b56b4526a3f6447789ba141568575a1.tar.lz
cuberite-a9b597087b56b4526a3f6447789ba141568575a1.tar.xz
cuberite-a9b597087b56b4526a3f6447789ba141568575a1.tar.zst
cuberite-a9b597087b56b4526a3f6447789ba141568575a1.zip
Diffstat (limited to 'src/Mobs/PassiveAggressiveMonster.cpp')
-rw-r--r--src/Mobs/PassiveAggressiveMonster.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Mobs/PassiveAggressiveMonster.cpp b/src/Mobs/PassiveAggressiveMonster.cpp
index 4b45f9a2a..24501b1ba 100644
--- a/src/Mobs/PassiveAggressiveMonster.cpp
+++ b/src/Mobs/PassiveAggressiveMonster.cpp
@@ -19,9 +19,12 @@ cPassiveAggressiveMonster::cPassiveAggressiveMonster(const AString & a_ConfigNam
-void cPassiveAggressiveMonster::DoTakeDamage(TakeDamageInfo & a_TDI)
+bool cPassiveAggressiveMonster::DoTakeDamage(TakeDamageInfo & a_TDI)
{
- super::DoTakeDamage(a_TDI);
+ if (!super::DoTakeDamage(a_TDI))
+ {
+ return false;
+ }
if ((m_Target != NULL) && (m_Target->IsPlayer()))
{
@@ -30,6 +33,7 @@ void cPassiveAggressiveMonster::DoTakeDamage(TakeDamageInfo & a_TDI)
m_EMState = CHASING;
}
}
+ return true;
}