diff options
author | archshift <admin@archshift.com> | 2014-07-10 08:28:27 +0200 |
---|---|---|
committer | archshift <admin@archshift.com> | 2014-07-10 08:28:27 +0200 |
commit | e824cd09b369c47a7f316fccc7577cd923164466 (patch) | |
tree | d8efa178a29955525458a38b1351ea0b609a2a09 /src/Mobs/Zombie.cpp | |
parent | EntityEffects.x -> EntityEffect.x, Object-Oriented effects (diff) | |
parent | Merge pull request #1157 from Howaner/Window (diff) | |
download | cuberite-e824cd09b369c47a7f316fccc7577cd923164466.tar cuberite-e824cd09b369c47a7f316fccc7577cd923164466.tar.gz cuberite-e824cd09b369c47a7f316fccc7577cd923164466.tar.bz2 cuberite-e824cd09b369c47a7f316fccc7577cd923164466.tar.lz cuberite-e824cd09b369c47a7f316fccc7577cd923164466.tar.xz cuberite-e824cd09b369c47a7f316fccc7577cd923164466.tar.zst cuberite-e824cd09b369c47a7f316fccc7577cd923164466.zip |
Diffstat (limited to 'src/Mobs/Zombie.cpp')
-rw-r--r-- | src/Mobs/Zombie.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Mobs/Zombie.cpp b/src/Mobs/Zombie.cpp index f19e096ee..725790ed9 100644 --- a/src/Mobs/Zombie.cpp +++ b/src/Mobs/Zombie.cpp @@ -44,11 +44,10 @@ void cZombie::GetDrops(cItems & a_Drops, cEntity * a_Killer) void cZombie::MoveToPosition(const Vector3f & a_Position) { - // If the destination is in the sun and if it is not night AND the zombie 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; |