1
0
Fork 0

Merge pull request #2641 from cuberite/worktycho-patch-1

Blocks outside the world are never solid
This commit is contained in:
Julian Laubstein 2015-11-13 13:39:16 +01:00
commit 62b1d0b772
1 changed files with 4 additions and 0 deletions

View File

@ -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())
{