summaryrefslogtreecommitdiffstats
path: root/src/Mobs
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2021-04-30 15:23:46 +0200
committerGitHub <noreply@github.com>2021-04-30 15:23:46 +0200
commit9b97d63f8f939dbc431cc2dcd9eddf959f86603a (patch)
tree98aada7aa4e7fc57e0fb0bf9a1bc84e996f483b1 /src/Mobs
parentFix: GetPhysicalRamUsage on FreeBSD (UNIX) - webadmin display (#5213) (diff)
downloadcuberite-9b97d63f8f939dbc431cc2dcd9eddf959f86603a.tar
cuberite-9b97d63f8f939dbc431cc2dcd9eddf959f86603a.tar.gz
cuberite-9b97d63f8f939dbc431cc2dcd9eddf959f86603a.tar.bz2
cuberite-9b97d63f8f939dbc431cc2dcd9eddf959f86603a.tar.lz
cuberite-9b97d63f8f939dbc431cc2dcd9eddf959f86603a.tar.xz
cuberite-9b97d63f8f939dbc431cc2dcd9eddf959f86603a.tar.zst
cuberite-9b97d63f8f939dbc431cc2dcd9eddf959f86603a.zip
Diffstat (limited to 'src/Mobs')
-rw-r--r--src/Mobs/PathFinder.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Mobs/PathFinder.cpp b/src/Mobs/PathFinder.cpp
index 5356cedfe..bcc48d80e 100644
--- a/src/Mobs/PathFinder.cpp
+++ b/src/Mobs/PathFinder.cpp
@@ -192,7 +192,7 @@ bool cPathFinder::EnsureProperPoint(Vector3d & a_Vector, cChunk & a_Chunk)
// This fixes the player leaning issue.
// If that failed, we instead go down to the lowest air block.
int YBelowUs = FloorC(a_Vector.y) - 1;
- if (YBelowUs < 0)
+ if (!cChunkDef::IsValidHeight(YBelowUs))
{
return false;