summaryrefslogtreecommitdiffstats
path: root/source/Mobs/Zombie.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2013-11-05 17:22:31 +0100
committerMattes D <github@xoft.cz>2013-11-05 17:22:31 +0100
commite65ce130127b3a56e12421d745b98549c0669a95 (patch)
tree52472269f5b9635e3370333b5dbc00fd97700975 /source/Mobs/Zombie.cpp
parentProtocol 1.7: Added more client-bound packets. (diff)
parentFixed indentation. (diff)
downloadcuberite-e65ce130127b3a56e12421d745b98549c0669a95.tar
cuberite-e65ce130127b3a56e12421d745b98549c0669a95.tar.gz
cuberite-e65ce130127b3a56e12421d745b98549c0669a95.tar.bz2
cuberite-e65ce130127b3a56e12421d745b98549c0669a95.tar.lz
cuberite-e65ce130127b3a56e12421d745b98549c0669a95.tar.xz
cuberite-e65ce130127b3a56e12421d745b98549c0669a95.tar.zst
cuberite-e65ce130127b3a56e12421d745b98549c0669a95.zip
Diffstat (limited to 'source/Mobs/Zombie.cpp')
-rw-r--r--source/Mobs/Zombie.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/source/Mobs/Zombie.cpp b/source/Mobs/Zombie.cpp
index 1752ec390..a485d2b55 100644
--- a/source/Mobs/Zombie.cpp
+++ b/source/Mobs/Zombie.cpp
@@ -30,3 +30,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())
+ {
+ m_bMovingToDestination = false;
+ return;
+ }
+ m_bMovingToDestination = true;
+}
+
+