diff options
author | worktycho <work.tycho@gmail.com> | 2015-11-13 12:50:21 +0100 |
---|---|---|
committer | worktycho <work.tycho@gmail.com> | 2015-11-13 12:50:21 +0100 |
commit | 5f34097ab345a2974434d31e5c97b46a5183919c (patch) | |
tree | a55ffd97476edfb01ae66ae3de201700a8ee63b2 /src/Mobs | |
parent | Merge pull request #2632 from Gargaj/patch-1 (diff) | |
download | cuberite-5f34097ab345a2974434d31e5c97b46a5183919c.tar cuberite-5f34097ab345a2974434d31e5c97b46a5183919c.tar.gz cuberite-5f34097ab345a2974434d31e5c97b46a5183919c.tar.bz2 cuberite-5f34097ab345a2974434d31e5c97b46a5183919c.tar.lz cuberite-5f34097ab345a2974434d31e5c97b46a5183919c.tar.xz cuberite-5f34097ab345a2974434d31e5c97b46a5183919c.tar.zst cuberite-5f34097ab345a2974434d31e5c97b46a5183919c.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Mobs/Path.cpp | 4 |
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()) { |