1
0
This commit is contained in:
Tiger Wang 2014-04-18 12:59:14 +01:00
parent 200ea6254c
commit 6cb63a768d
2 changed files with 12 additions and 1 deletions

View File

@ -772,6 +772,16 @@ void cEntity::TickBurning(cChunk & a_Chunk)
// Remember the current burning state:
bool HasBeenBurning = (m_TicksLeftBurning > 0);
if (GetWorld()->GetWeather() == eWeather_Rain)
{
if (HasBeenBurning)
{
m_TicksLeftBurning = 0;
OnFinishedBurning();
}
return;
}
// Do the burning damage:
if (m_TicksLeftBurning > 0)
{

View File

@ -1003,7 +1003,8 @@ void cMonster::HandleDaylightBurning(cChunk & a_Chunk)
(a_Chunk.GetSkyLight(RelX, RelY, RelZ) == 15) && // In the daylight
(a_Chunk.GetBlock(RelX, RelY, RelZ) != E_BLOCK_SOULSAND) && // Not on soulsand
(GetWorld()->GetTimeOfDay() < (12000 + 1000)) && // It is nighttime
!IsOnFire() // Not already burning
!IsOnFire() && // Not already burning
(GetWorld()->GetWeather() != eWeather_Rain) // Not raining
)
{
// Burn for 100 ticks, then decide again