summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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())
{