summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Entities/Entity.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/Entities/Entity.cpp b/src/Entities/Entity.cpp
index 56ef36ef8..c1926dafc 100644
--- a/src/Entities/Entity.cpp
+++ b/src/Entities/Entity.cpp
@@ -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: