summaryrefslogtreecommitdiffstats
path: root/src/Mobs/PassiveAggressiveMonster.cpp
diff options
context:
space:
mode:
authorLogicParrot <LogicParrot@users.noreply.github.com>2016-02-04 08:20:08 +0100
committerLogicParrot <LogicParrot@users.noreply.github.com>2016-02-04 08:20:08 +0100
commit7767acdc4bdb4bcebcc2ae3fbf84b537d1016cd1 (patch)
treee83b2297221f3f74360304cbb4671fa8a7079722 /src/Mobs/PassiveAggressiveMonster.cpp
parentMerge pull request #2941 from LogicParrot/chunkBug2 (diff)
parentcMonster::m_Target safety across worlds (diff)
downloadcuberite-7767acdc4bdb4bcebcc2ae3fbf84b537d1016cd1.tar
cuberite-7767acdc4bdb4bcebcc2ae3fbf84b537d1016cd1.tar.gz
cuberite-7767acdc4bdb4bcebcc2ae3fbf84b537d1016cd1.tar.bz2
cuberite-7767acdc4bdb4bcebcc2ae3fbf84b537d1016cd1.tar.lz
cuberite-7767acdc4bdb4bcebcc2ae3fbf84b537d1016cd1.tar.xz
cuberite-7767acdc4bdb4bcebcc2ae3fbf84b537d1016cd1.tar.zst
cuberite-7767acdc4bdb4bcebcc2ae3fbf84b537d1016cd1.zip
Diffstat (limited to '')
-rw-r--r--src/Mobs/PassiveAggressiveMonster.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Mobs/PassiveAggressiveMonster.cpp b/src/Mobs/PassiveAggressiveMonster.cpp
index 71ac7bd89..a1bb1138f 100644
--- a/src/Mobs/PassiveAggressiveMonster.cpp
+++ b/src/Mobs/PassiveAggressiveMonster.cpp
@@ -26,9 +26,9 @@ bool cPassiveAggressiveMonster::DoTakeDamage(TakeDamageInfo & a_TDI)
return false;
}
- if ((m_Target != nullptr) && (m_Target->IsPlayer()))
+ if ((GetTarget() != nullptr) && (GetTarget()->IsPlayer()))
{
- if (!static_cast<cPlayer *>(m_Target)->IsGameModeCreative())
+ if (!static_cast<cPlayer *>(GetTarget())->IsGameModeCreative())
{
m_EMState = CHASING;
}