summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Zombie.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-01-25 00:56:05 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-01-25 00:56:05 +0100
commitb367a74d3e56927e3a1f55738fb13abd6d667814 (patch)
treeb4b28321614a3f497fdaebf1bc54869b2cdc4beb /src/Mobs/Zombie.cpp
parentMiscellaneous improvements (diff)
downloadcuberite-b367a74d3e56927e3a1f55738fb13abd6d667814.tar
cuberite-b367a74d3e56927e3a1f55738fb13abd6d667814.tar.gz
cuberite-b367a74d3e56927e3a1f55738fb13abd6d667814.tar.bz2
cuberite-b367a74d3e56927e3a1f55738fb13abd6d667814.tar.lz
cuberite-b367a74d3e56927e3a1f55738fb13abd6d667814.tar.xz
cuberite-b367a74d3e56927e3a1f55738fb13abd6d667814.tar.zst
cuberite-b367a74d3e56927e3a1f55738fb13abd6d667814.zip
Diffstat (limited to '')
-rw-r--r--src/Mobs/Zombie.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/Mobs/Zombie.cpp b/src/Mobs/Zombie.cpp
index a046fcc92..27e8ed5fb 100644
--- a/src/Mobs/Zombie.cpp
+++ b/src/Mobs/Zombie.cpp
@@ -34,15 +34,18 @@ void cZombie::GetDrops(cItems & a_Drops, cEntity * a_Killer)
void cZombie::MoveToPosition(const Vector3f & a_Position)
{
- m_Destination = 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 ((m_World->GetBlockSkyLight((int) a_Position.x, (int) a_Position.y, (int) a_Position.z) == 15) && (m_World->GetTimeOfDay() < 13187) && !IsOnFire())
+ // 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 (
+ !IsOnFire() &&
+ (m_World->GetTimeOfDay() < 13187) &&
+ (m_World->GetBlockSkyLight((int)a_Position.x, (int)a_Position.y, (int)a_Position.z) == 15)
+ )
{
m_bMovingToDestination = false;
return;
}
- m_bMovingToDestination = true;
+
+ super::MoveToPosition(a_Position);
}