summaryrefslogtreecommitdiffstats
path: root/source/Mobs/Skeleton.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-09-05 17:44:22 +0200
committermadmaxoft <github@xoft.cz>2013-09-05 17:44:22 +0200
commitcdaa48377846c688b4c003c35e02529ba00c779c (patch)
treedfb4d74621fc06768d4712dba4a297e6cc0e1b78 /source/Mobs/Skeleton.cpp
parentRemoved TimedWait from cEvent. (diff)
parentFixed inconsistent meta naming (diff)
downloadcuberite-cdaa48377846c688b4c003c35e02529ba00c779c.tar
cuberite-cdaa48377846c688b4c003c35e02529ba00c779c.tar.gz
cuberite-cdaa48377846c688b4c003c35e02529ba00c779c.tar.bz2
cuberite-cdaa48377846c688b4c003c35e02529ba00c779c.tar.lz
cuberite-cdaa48377846c688b4c003c35e02529ba00c779c.tar.xz
cuberite-cdaa48377846c688b4c003c35e02529ba00c779c.tar.zst
cuberite-cdaa48377846c688b4c003c35e02529ba00c779c.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);
+ }
}
}