summaryrefslogtreecommitdiffstats
path: root/source/Mobs/Skeleton.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/Skeleton.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 '')
-rw-r--r--source/Mobs/Skeleton.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/source/Mobs/Skeleton.cpp b/source/Mobs/Skeleton.cpp
index bec912afa..ad4037db9 100644
--- a/source/Mobs/Skeleton.cpp
+++ b/source/Mobs/Skeleton.cpp
@@ -21,12 +21,13 @@ void cSkeleton::Tick(float a_Dt, cChunk & a_Chunk)
{
cMonster::Tick(a_Dt, a_Chunk);
- // TODO Outsource
- // TODO should do SkyLight check, mobs in the dark donīt burn
- 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);
+ }
}
}