From 6309c6a97fdbabfde978358f5f9a0f61ab74f91f Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Tue, 26 Dec 2017 21:25:57 +0000 Subject: improve rain simulation (#4017) * Uses vanilla logic to decide which blocks rain falls through. * Rain falls infinitely above the world, and stops at y=0. * Entities will now be extinguished if they are under rain-blocking blocks, and fire will now be extinguished by rain similarly. * Create IsWeatherWetAtXYZ to identify wetness at a particular location. * Use new code for enderman rain detection. * Fixes issue #916 * Disable warnings for global constructors in the fire simulator. --- src/Entities/Entity.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/Entities') diff --git a/src/Entities/Entity.cpp b/src/Entities/Entity.cpp index 4245f607d..646566ae6 100644 --- a/src/Entities/Entity.cpp +++ b/src/Entities/Entity.cpp @@ -1172,12 +1172,9 @@ void cEntity::TickBurning(cChunk & a_Chunk) } // Fire is extinguished by rain - if (GetWorld()->IsWeatherWetAt(POSX_TOINT, POSZ_TOINT)) + if (GetWorld()->IsWeatherWetAtXYZ(GetPosition().Floor())) { - if (POSY_TOINT > m_World->GetHeight(POSX_TOINT, POSZ_TOINT)) - { - m_TicksLeftBurning = 0; - } + m_TicksLeftBurning = 0; } // Do the burning damage: -- cgit v1.2.3