1
0

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.
This commit is contained in:
Alexander Harkness
2017-12-26 21:25:57 +00:00
committed by GitHub
parent ab5ff6a6f8
commit 6309c6a97f
12 changed files with 180 additions and 113 deletions

View File

@@ -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: