1
0

Blocks outside the world are never solid

Fixes #2539
This commit is contained in:
worktycho 2015-11-13 11:50:21 +00:00
parent c001a99a68
commit 5f34097ab3

View File

@ -126,6 +126,10 @@ bool cPath::IsSolid(const Vector3i & a_Location)
{ {
ASSERT(m_Chunk != nullptr); ASSERT(m_Chunk != nullptr);
if (!cChunkDef::IsValidHeight(a_Location.y))
{
return false;
}
auto Chunk = m_Chunk->GetNeighborChunk(a_Location.x, a_Location.z); auto Chunk = m_Chunk->GetNeighborChunk(a_Location.x, a_Location.z);
if ((Chunk == nullptr) || !Chunk->IsValid()) if ((Chunk == nullptr) || !Chunk->IsValid())
{ {