summaryrefslogtreecommitdiffstats
path: root/source/Mobs/Zombie.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2013-08-27 22:11:00 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2013-08-27 22:11:00 +0200
commitfa7def847b4565667b75f34502b2675c375057ad (patch)
treedf36deba68f0ab02200aae096389ff8c91097863 /source/Mobs/Zombie.cpp
parentPreliminary Minecart physics handling [SEE DESC] (diff)
downloadcuberite-fa7def847b4565667b75f34502b2675c375057ad.tar
cuberite-fa7def847b4565667b75f34502b2675c375057ad.tar.gz
cuberite-fa7def847b4565667b75f34502b2675c375057ad.tar.bz2
cuberite-fa7def847b4565667b75f34502b2675c375057ad.tar.lz
cuberite-fa7def847b4565667b75f34502b2675c375057ad.tar.xz
cuberite-fa7def847b4565667b75f34502b2675c375057ad.tar.zst
cuberite-fa7def847b4565667b75f34502b2675c375057ad.zip
Diffstat (limited to 'source/Mobs/Zombie.cpp')
-rw-r--r--source/Mobs/Zombie.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/source/Mobs/Zombie.cpp b/source/Mobs/Zombie.cpp
index a6e39d6df..f3adf1283 100644
--- a/source/Mobs/Zombie.cpp
+++ b/source/Mobs/Zombie.cpp
@@ -3,10 +3,12 @@
#include "Zombie.h"
#include "../World.h"
+#include "../LineBlockTracer.h"
+// They're eating your brains!
cZombie::cZombie(void) :
super("Zombie", 54, "mob.zombie.hurt", "mob.zombie.death", 0.6, 1.8)
@@ -20,12 +22,13 @@ cZombie::cZombie(void) :
void cZombie::Tick(float a_Dt, cChunk & a_Chunk)
{
super::Tick(a_Dt, a_Chunk);
-
- // TODO Same as in cSkeleton :D
- if ((GetWorld()->GetTimeOfDay() < (12000 + 1000)) && !IsOnFire())
+ if ((GetWorld()->GetBlockSkyLight(GetPosX(), GetPosY(), GetPosZ()) == 15) && (GetWorld()->GetBlock(GetPosX(), GetPosY(), GetPosZ()) != E_BLOCK_SOULSAND))
{
- // Burn for 10 ticks, then decide again
- StartBurning(10);
+ if ((GetWorld()->GetTimeOfDay() < (12000 + 1000)) && !IsOnFire())
+ {
+ // Burn for 100 ticks, then decide again
+ StartBurning(100);
+ }
}
}