1
0

Mobs shouldn't burn when it's Raining #906

This commit is contained in:
r.ramazanov 2014-04-21 13:13:25 +04:00
parent 9f58046b5b
commit a967313839

View File

@ -774,12 +774,19 @@ void cEntity::TickBurning(cChunk & a_Chunk)
if (GetWorld()->GetWeather() == eWeather_Rain)
{
if (HasBeenBurning)
int PosX = POSX_TOINT - a_Chunk.GetPosX() * cChunkDef::Width,
PosY = POSY_TOINT,
PosZ = POSZ_TOINT - a_Chunk.GetPosZ() * cChunkDef::Width;
if ((PosY > 0) || (PosY <= cChunkDef::Height))
{
m_TicksLeftBurning = 0;
OnFinishedBurning();
}
return;
// Inside the world
if (a_Chunk.GetSkyLight(PosX, PosY, PosZ) == 15)
{
m_TicksLeftBurning = 0;
}
}
}
// Do the burning damage: