summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGargaj <gargaj@conspiracy.hu>2015-11-08 20:53:32 +0100
committerGargaj <gargaj@conspiracy.hu>2015-11-08 23:42:26 +0100
commit97ddcc1c0ae13cf585959e655d55e215b2c5eca6 (patch)
tree91b6e96dc86a2b6a91bf2ca65f97c0273ee76eb9 /src
parentMerge pull request #2626 from cuberite/worktycho-patch-1 (diff)
downloadcuberite-97ddcc1c0ae13cf585959e655d55e215b2c5eca6.tar
cuberite-97ddcc1c0ae13cf585959e655d55e215b2c5eca6.tar.gz
cuberite-97ddcc1c0ae13cf585959e655d55e215b2c5eca6.tar.bz2
cuberite-97ddcc1c0ae13cf585959e655d55e215b2c5eca6.tar.lz
cuberite-97ddcc1c0ae13cf585959e655d55e215b2c5eca6.tar.xz
cuberite-97ddcc1c0ae13cf585959e655d55e215b2c5eca6.tar.zst
cuberite-97ddcc1c0ae13cf585959e655d55e215b2c5eca6.zip
Diffstat (limited to '')
-rw-r--r--src/Mobs/Enderman.cpp2
-rw-r--r--src/Mobs/PassiveAggressiveMonster.cpp6
-rw-r--r--src/Mobs/PassiveAggressiveMonster.h1
3 files changed, 8 insertions, 1 deletions
diff --git a/src/Mobs/Enderman.cpp b/src/Mobs/Enderman.cpp
index 30bf82067..ac749e36a 100644
--- a/src/Mobs/Enderman.cpp
+++ b/src/Mobs/Enderman.cpp
@@ -126,7 +126,7 @@ void cEnderman::CheckEventSeePlayer()
if (!Callback.GetPlayer()->IsGameModeCreative())
{
- super::EventSeePlayer(Callback.GetPlayer());
+ cMonster::EventSeePlayer(Callback.GetPlayer());
m_EMState = CHASING;
m_bIsScreaming = true;
GetWorld()->BroadcastEntityMetadata(*this);
diff --git a/src/Mobs/PassiveAggressiveMonster.cpp b/src/Mobs/PassiveAggressiveMonster.cpp
index f5577f71f..e0abd94a5 100644
--- a/src/Mobs/PassiveAggressiveMonster.cpp
+++ b/src/Mobs/PassiveAggressiveMonster.cpp
@@ -39,3 +39,9 @@ bool cPassiveAggressiveMonster::DoTakeDamage(TakeDamageInfo & a_TDI)
+void cPassiveAggressiveMonster::EventSeePlayer(cEntity *)
+{
+ // don't do anything, neutral mobs don't react to just seeing the player
+}
+
+
diff --git a/src/Mobs/PassiveAggressiveMonster.h b/src/Mobs/PassiveAggressiveMonster.h
index 72f472281..02dad2f40 100644
--- a/src/Mobs/PassiveAggressiveMonster.h
+++ b/src/Mobs/PassiveAggressiveMonster.h
@@ -16,6 +16,7 @@ public:
cPassiveAggressiveMonster(const AString & a_ConfigName, eMonsterType a_MobType, const AString & a_SoundHurt, const AString & a_SoundDeath, double a_Width, double a_Height);
virtual bool DoTakeDamage(TakeDamageInfo & a_TDI) override;
+ virtual void EventSeePlayer(cEntity *) override;
} ;