1
0

Moved daylight burning directly into cMonster.

This commit is contained in:
madmaxoft
2013-09-05 22:40:08 +02:00
parent cdaa483778
commit ff762a7ece
6 changed files with 46 additions and 40 deletions

View File

@@ -11,24 +11,7 @@
cSkeleton::cSkeleton(void) :
super("Skeleton", 51, "mob.skeleton.hurt", "mob.skeleton.death", 0.6, 1.8)
{
}
void cSkeleton::Tick(float a_Dt, cChunk & a_Chunk)
{
cMonster::Tick(a_Dt, a_Chunk);
if ((GetWorld()->GetBlockSkyLight(GetPosX(), GetPosY(), GetPosZ()) == 15) && (GetWorld()->GetBlock(GetPosX(), GetPosY(), GetPosZ()) != E_BLOCK_SOULSAND))
{
if ((GetWorld()->GetTimeOfDay() < (12000 + 1000)) && !IsOnFire())
{
// Burn for 100 ticks, then decide again
StartBurning(100);
}
}
SetBurnsInDaylight(true);
}