From 978663b725dd2a7b756b4fcecf0453e42ce16b79 Mon Sep 17 00:00:00 2001 From: LogicParrot Date: Wed, 23 Aug 2017 19:08:48 +0300 Subject: d --- src/Mobs/Enderman.cpp | 63 +-------------------------------------------------- 1 file changed, 1 insertion(+), 62 deletions(-) (limited to 'src/Mobs/Enderman.cpp') diff --git a/src/Mobs/Enderman.cpp b/src/Mobs/Enderman.cpp index 5cfe0d4cd..6aa72369f 100644 --- a/src/Mobs/Enderman.cpp +++ b/src/Mobs/Enderman.cpp @@ -98,67 +98,6 @@ void cEnderman::GetDrops(cItems & a_Drops, cEntity * a_Killer) -void cEnderman::CheckEventSeePlayer(cChunk & a_Chunk) -{ - if (GetTarget() != nullptr) - { - return; - } - - cPlayerLookCheck Callback(GetPosition(), m_SightDistance); - if (m_World->ForEachPlayer(Callback)) - { - return; - } - - ASSERT(Callback.GetPlayer() != nullptr); - - if (!CheckLight()) - { - // Insufficient light for enderman to become aggravated - // TODO: Teleport to a suitable location - return; - } - - if (!Callback.GetPlayer()->CanMobsTarget()) - { - return; - } - - // Target the player - cMonster::EventSeePlayer(Callback.GetPlayer(), a_Chunk); - m_EMState = CHASING; - m_bIsScreaming = true; - GetWorld()->BroadcastEntityMetadata(*this); -} - - - - - -void cEnderman::CheckEventLostPlayer(void) -{ - super::CheckEventLostPlayer(); - if (!CheckLight()) - { - EventLosePlayer(); - } -} - - - - - -void cEnderman::EventLosePlayer() -{ - super::EventLosePlayer(); - m_bIsScreaming = false; - GetWorld()->BroadcastEntityMetadata(*this); -} - - - - bool cEnderman::CheckLight() { @@ -197,7 +136,7 @@ void cEnderman::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) // Take damage when touching water, drowning damage seems to be most appropriate if (CheckRain() || IsSwimming()) { - EventLosePlayer(); + // EventLosePlayer(); //mobTodo TakeDamage(dtDrowning, nullptr, 1, 0); // TODO teleport to a safe location } -- cgit v1.2.3