Don't burn mobs in daylight when swimming (#4145)
This commit is contained in:
parent
a72891fbb0
commit
3065a101a5
@ -1359,7 +1359,8 @@ bool cMonster::WouldBurnAt(Vector3d a_Location, cChunk & a_Chunk)
|
|||||||
if (
|
if (
|
||||||
(Chunk->GetBlock(Rel.x, Rel.y, Rel.z) != E_BLOCK_SOULSAND) && // Not on soulsand
|
(Chunk->GetBlock(Rel.x, Rel.y, Rel.z) != E_BLOCK_SOULSAND) && // Not on soulsand
|
||||||
(GetWorld()->GetTimeOfDay() < 12000 + 1000) && // Daytime
|
(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
|
int MobHeight = CeilC(a_Location.y + GetHeight()) - 1; // The block Y coord of the mob's head
|
||||||
|
Loading…
Reference in New Issue
Block a user