summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Harkness <me@bearbin.net>2017-08-25 17:26:45 +0200
committerGitHub <noreply@github.com>2017-08-25 17:26:45 +0200
commit0140923c352c0dbb2c957fbff1f5266976d47fa1 (patch)
tree658b4219cd864d96524903a0196117e5c978cc22
parentGives all entities the default airlevel on creation (#3942) (diff)
downloadcuberite-0140923c352c0dbb2c957fbff1f5266976d47fa1.tar
cuberite-0140923c352c0dbb2c957fbff1f5266976d47fa1.tar.gz
cuberite-0140923c352c0dbb2c957fbff1f5266976d47fa1.tar.bz2
cuberite-0140923c352c0dbb2c957fbff1f5266976d47fa1.tar.lz
cuberite-0140923c352c0dbb2c957fbff1f5266976d47fa1.tar.xz
cuberite-0140923c352c0dbb2c957fbff1f5266976d47fa1.tar.zst
cuberite-0140923c352c0dbb2c957fbff1f5266976d47fa1.zip
-rw-r--r--src/Mobs/Monster.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Mobs/Monster.cpp b/src/Mobs/Monster.cpp
index 26db4b3dd..0d433d861 100644
--- a/src/Mobs/Monster.cpp
+++ b/src/Mobs/Monster.cpp
@@ -1363,17 +1363,17 @@ bool cMonster::WouldBurnAt(Vector3d a_Location, cChunk & a_Chunk)
GetWorld()->IsWeatherSunnyAt(POSX_TOINT, POSZ_TOINT) // Not raining
)
{
- int MobHeight = FloorC(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
if (MobHeight >= cChunkDef::Height)
{
return true;
}
- // Start with the highest block and scan down to the mob's head.
+ // Start with the highest block and scan down to just above the mob's head.
// If a non transparent is found, return false (do not burn). Otherwise return true.
// Note that this loop is not a performance concern as transparent blocks are rare and the loop almost always bailes out
// instantly.(An exception is e.g. standing under a long column of glass).
int CurrentBlock = Chunk->GetHeight(Rel.x, Rel.z);
- while (CurrentBlock >= MobHeight)
+ while (CurrentBlock > MobHeight)
{
BLOCKTYPE Block = Chunk->GetBlock(Rel.x, CurrentBlock, Rel.z);
if (