1
0

Client can no longer place blocks outside the Y range of the world.

Fixes #128.
This commit is contained in:
madmaxoft 2013-08-24 21:25:36 +02:00
parent e157808737
commit 259f08aac8

View File

@ -871,6 +871,11 @@ void cClientHandle::HandlePlaceBlock(int a_BlockX, int a_BlockY, int a_BlockZ, c
return;
}
if ((a_BlockY < 0) || (a_BlockY >= cChunkDef::Height))
{
// The block is being placed outside the world, ignore this packet altogether (#128)
return;
}
BLOCKTYPE PlaceBlock = World->GetBlock(a_BlockX, a_BlockY, a_BlockZ);
if (!BlockHandler(PlaceBlock)->DoesIgnoreBuildCollision())