summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Enderman.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2020-12-18 21:48:32 +0100
committerTiger Wang <ziwei.tiger@outlook.com>2020-12-21 14:52:23 +0100
commit47c0b48bfd5df90cf889574c5634542d2aaa8873 (patch)
treea45252c6fa1add902671ea07eebf2bd49f0bec85 /src/Mobs/Enderman.cpp
parentChunk: use FAST_FLOOR_DIV (diff)
downloadcuberite-47c0b48bfd5df90cf889574c5634542d2aaa8873.tar
cuberite-47c0b48bfd5df90cf889574c5634542d2aaa8873.tar.gz
cuberite-47c0b48bfd5df90cf889574c5634542d2aaa8873.tar.bz2
cuberite-47c0b48bfd5df90cf889574c5634542d2aaa8873.tar.lz
cuberite-47c0b48bfd5df90cf889574c5634542d2aaa8873.tar.xz
cuberite-47c0b48bfd5df90cf889574c5634542d2aaa8873.tar.zst
cuberite-47c0b48bfd5df90cf889574c5634542d2aaa8873.zip
Diffstat (limited to '')
-rw-r--r--src/Mobs/Enderman.cpp20
1 files changed, 2 insertions, 18 deletions
diff --git a/src/Mobs/Enderman.cpp b/src/Mobs/Enderman.cpp
index 3b8cd77e5..302593183 100644
--- a/src/Mobs/Enderman.cpp
+++ b/src/Mobs/Enderman.cpp
@@ -113,14 +113,8 @@ void cEnderman::CheckEventSeePlayer(cChunk & a_Chunk)
ASSERT(Callback.GetPlayer() != nullptr);
- if (!Callback.GetPlayer()->CanMobsTarget())
- {
- return;
- }
-
- // Target the player
- cMonster::EventSeePlayer(Callback.GetPlayer(), a_Chunk);
- m_EMState = CHASING;
+ // Target the player:
+ cAggressiveMonster::EventSeePlayer(Callback.GetPlayer(), a_Chunk);
m_bIsScreaming = true;
GetWorld()->BroadcastEntityMetadata(*this);
}
@@ -129,16 +123,6 @@ void cEnderman::CheckEventSeePlayer(cChunk & a_Chunk)
-void cEnderman::CheckEventLostPlayer(void)
-{
- Super::CheckEventLostPlayer();
- EventLosePlayer();
-}
-
-
-
-
-
void cEnderman::EventLosePlayer()
{
Super::EventLosePlayer();