summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Skeleton.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-07-09 10:50:38 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-07-09 10:50:38 +0200
commit372dbbb994a1414369fe38367d458a0c32866a79 (patch)
tree5cd564fbb0c4b7c0b47f3cb64594c34f9361f1dc /src/Mobs/Skeleton.cpp
parentUpdated generator prefabs to current Gallery contents. (diff)
parentAdded extra space before comments (diff)
downloadcuberite-372dbbb994a1414369fe38367d458a0c32866a79.tar
cuberite-372dbbb994a1414369fe38367d458a0c32866a79.tar.gz
cuberite-372dbbb994a1414369fe38367d458a0c32866a79.tar.bz2
cuberite-372dbbb994a1414369fe38367d458a0c32866a79.tar.lz
cuberite-372dbbb994a1414369fe38367d458a0c32866a79.tar.xz
cuberite-372dbbb994a1414369fe38367d458a0c32866a79.tar.zst
cuberite-372dbbb994a1414369fe38367d458a0c32866a79.zip
Diffstat (limited to 'src/Mobs/Skeleton.cpp')
-rw-r--r--src/Mobs/Skeleton.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Mobs/Skeleton.cpp b/src/Mobs/Skeleton.cpp
index e3357185d..0641a3d57 100644
--- a/src/Mobs/Skeleton.cpp
+++ b/src/Mobs/Skeleton.cpp
@@ -49,11 +49,10 @@ void cSkeleton::GetDrops(cItems & a_Drops, cEntity * a_Killer)
void cSkeleton::MoveToPosition(const Vector3f & a_Position)
{
- // If the destination is in the sun and if it is not night AND the skeleton isn't on fire then block the movement.
+ // If the destination is sufficiently skylight challenged AND the skeleton isn't on fire then block the movement
if (
!IsOnFire() &&
- (m_World->GetTimeOfDay() < 13187) &&
- (m_World->GetBlockSkyLight((int) a_Position.x, (int) a_Position.y, (int) a_Position.z) == 15)
+ (m_World->GetBlockSkyLight((int)floor(a_Position.x), (int)floor(a_Position.y), (int)floor(a_Position.z)) - m_World->GetSkyDarkness() > 8)
)
{
m_bMovingToDestination = false;