From 5f34097ab345a2974434d31e5c97b46a5183919c Mon Sep 17 00:00:00 2001 From: worktycho Date: Fri, 13 Nov 2015 11:50:21 +0000 Subject: Blocks outside the world are never solid Fixes #2539 --- src/Mobs/Path.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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()) { -- cgit v1.2.3