1
0
Fork 0

Don't burn mobs in daylight when swimming (#4145)

This commit is contained in:
Bond-009 2018-01-15 23:44:48 +01:00 committed by Alexander Harkness
parent a72891fbb0
commit 3065a101a5
1 changed files with 2 additions and 1 deletions

View File

@ -1359,7 +1359,8 @@ bool cMonster::WouldBurnAt(Vector3d a_Location, cChunk & a_Chunk)
if (
(Chunk->GetBlock(Rel.x, Rel.y, Rel.z) != E_BLOCK_SOULSAND) && // Not on soulsand
(GetWorld()->GetTimeOfDay() < 12000 + 1000) && // Daytime
GetWorld()->IsWeatherSunnyAt(POSX_TOINT, POSZ_TOINT) // Not raining
GetWorld()->IsWeatherSunnyAt(POSX_TOINT, POSZ_TOINT) && // Not raining
!IsInWater() // Isn't swimming
)
{
int MobHeight = CeilC(a_Location.y + GetHeight()) - 1; // The block Y coord of the mob's head