summaryrefslogtreecommitdiffstats
path: root/src/Mobs
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-01-24 22:54:20 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-01-24 22:54:20 +0100
commitbf2af73899ba678e1280aded70703a5d105d295d (patch)
tree9a44c1e68724c5173ec23e32ea018edc17586885 /src/Mobs
parentMade wolves compatible with new AI code (diff)
downloadcuberite-bf2af73899ba678e1280aded70703a5d105d295d.tar
cuberite-bf2af73899ba678e1280aded70703a5d105d295d.tar.gz
cuberite-bf2af73899ba678e1280aded70703a5d105d295d.tar.bz2
cuberite-bf2af73899ba678e1280aded70703a5d105d295d.tar.lz
cuberite-bf2af73899ba678e1280aded70703a5d105d295d.tar.xz
cuberite-bf2af73899ba678e1280aded70703a5d105d295d.tar.zst
cuberite-bf2af73899ba678e1280aded70703a5d105d295d.zip
Diffstat (limited to 'src/Mobs')
-rw-r--r--src/Mobs/PassiveAggressiveMonster.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/Mobs/PassiveAggressiveMonster.cpp b/src/Mobs/PassiveAggressiveMonster.cpp
index 28de65905..4b45f9a2a 100644
--- a/src/Mobs/PassiveAggressiveMonster.cpp
+++ b/src/Mobs/PassiveAggressiveMonster.cpp
@@ -25,8 +25,7 @@ void cPassiveAggressiveMonster::DoTakeDamage(TakeDamageInfo & a_TDI)
if ((m_Target != NULL) && (m_Target->IsPlayer()))
{
- cPlayer * Player = (cPlayer *) m_Target;
- if (Player->GetGameMode() != 1)
+ if (!((cPlayer *)m_Target)->IsGameModeCreative())
{
m_EMState = CHASING;
}