summaryrefslogtreecommitdiffstats
path: root/src/Mobs/PassiveAggressiveMonster.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-05-02 19:34:28 +0200
committermadmaxoft <github@xoft.cz>2014-05-02 19:34:28 +0200
commit839447f0bbdf97eb9b3c07f943647fa9c92b1e5b (patch)
tree3cde3e248dc73e19f3b241245fdff612842f9632 /src/Mobs/PassiveAggressiveMonster.cpp
parentA tiny speed improvement in ApplyFoodExhaustion() (diff)
parentFixed MagmaCube spawning. (diff)
downloadcuberite-839447f0bbdf97eb9b3c07f943647fa9c92b1e5b.tar
cuberite-839447f0bbdf97eb9b3c07f943647fa9c92b1e5b.tar.gz
cuberite-839447f0bbdf97eb9b3c07f943647fa9c92b1e5b.tar.bz2
cuberite-839447f0bbdf97eb9b3c07f943647fa9c92b1e5b.tar.lz
cuberite-839447f0bbdf97eb9b3c07f943647fa9c92b1e5b.tar.xz
cuberite-839447f0bbdf97eb9b3c07f943647fa9c92b1e5b.tar.zst
cuberite-839447f0bbdf97eb9b3c07f943647fa9c92b1e5b.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;
}