summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Monster.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2021-01-05 03:13:02 +0100
committerTiger Wang <ziwei.tiger@outlook.com>2021-01-11 17:39:56 +0100
commit9328afe65c72b29f5cedbf1897ea8559f6b2c42f (patch)
tree92d9490d062009278ed8d78f8981014e88ba8f05 /src/Mobs/Monster.cpp
parentzlib -> libdeflate (#5085) (diff)
downloadcuberite-9328afe65c72b29f5cedbf1897ea8559f6b2c42f.tar
cuberite-9328afe65c72b29f5cedbf1897ea8559f6b2c42f.tar.gz
cuberite-9328afe65c72b29f5cedbf1897ea8559f6b2c42f.tar.bz2
cuberite-9328afe65c72b29f5cedbf1897ea8559f6b2c42f.tar.lz
cuberite-9328afe65c72b29f5cedbf1897ea8559f6b2c42f.tar.xz
cuberite-9328afe65c72b29f5cedbf1897ea8559f6b2c42f.tar.zst
cuberite-9328afe65c72b29f5cedbf1897ea8559f6b2c42f.zip
Diffstat (limited to 'src/Mobs/Monster.cpp')
-rw-r--r--src/Mobs/Monster.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Mobs/Monster.cpp b/src/Mobs/Monster.cpp
index 7e8e7eba3..52b3f8454 100644
--- a/src/Mobs/Monster.cpp
+++ b/src/Mobs/Monster.cpp
@@ -1667,10 +1667,10 @@ 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
- !IsInWater() // Isn't swimming
+ (Chunk->GetBlock(Rel) != E_BLOCK_SOULSAND) && // Not on soulsand
+ (GetWorld()->GetTimeOfDay() < 12000 + 1000) && // Daytime
+ Chunk->IsWeatherSunnyAt(Rel.x, Rel.z) && // Not raining
+ !IsInWater() // Isn't swimming
)
{
int MobHeight = CeilC(a_Location.y + GetHeight()) - 1; // The block Y coord of the mob's head