From 3065a101a529a086c3cc10252093a3a75fe839d1 Mon Sep 17 00:00:00 2001 From: Bond-009 Date: Mon, 15 Jan 2018 23:44:48 +0100 Subject: [PATCH] Don't burn mobs in daylight when swimming (#4145) --- src/Mobs/Monster.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Mobs/Monster.cpp b/src/Mobs/Monster.cpp index 03b809275..9e9d51a78 100644 --- a/src/Mobs/Monster.cpp +++ b/src/Mobs/Monster.cpp @@ -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