summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Path.cpp
diff options
context:
space:
mode:
authorJulian Laubstein <julianlaubstein@yahoo.de>2015-11-13 13:39:16 +0100
committerJulian Laubstein <julianlaubstein@yahoo.de>2015-11-13 13:39:16 +0100
commit62b1d0b772d22fe2a2d28da66c37d83bd55837ca (patch)
treea55ffd97476edfb01ae66ae3de201700a8ee63b2 /src/Mobs/Path.cpp
parentMerge pull request #2632 from Gargaj/patch-1 (diff)
parentBlocks outside the world are never solid (diff)
downloadcuberite-62b1d0b772d22fe2a2d28da66c37d83bd55837ca.tar
cuberite-62b1d0b772d22fe2a2d28da66c37d83bd55837ca.tar.gz
cuberite-62b1d0b772d22fe2a2d28da66c37d83bd55837ca.tar.bz2
cuberite-62b1d0b772d22fe2a2d28da66c37d83bd55837ca.tar.lz
cuberite-62b1d0b772d22fe2a2d28da66c37d83bd55837ca.tar.xz
cuberite-62b1d0b772d22fe2a2d28da66c37d83bd55837ca.tar.zst
cuberite-62b1d0b772d22fe2a2d28da66c37d83bd55837ca.zip
Diffstat (limited to 'src/Mobs/Path.cpp')
-rw-r--r--src/Mobs/Path.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Mobs/Path.cpp b/src/Mobs/Path.cpp
index 43b29f1d0..06e2afc3f 100644
--- a/src/Mobs/Path.cpp
+++ b/src/Mobs/Path.cpp
@@ -126,6 +126,10 @@ bool cPath::IsSolid(const Vector3i & a_Location)
{
ASSERT(m_Chunk != nullptr);
+ if (!cChunkDef::IsValidHeight(a_Location.y))
+ {
+ return false;
+ }
auto Chunk = m_Chunk->GetNeighborChunk(a_Location.x, a_Location.z);
if ((Chunk == nullptr) || !Chunk->IsValid())
{