1
0

Correct world height validations.

Unify the way we test block above the current one (Height - 1 instead of a_RelY + 1).
Allow generation of world of flat height = 255
This commit is contained in:
Tommy Santerre
2015-02-14 17:11:38 -05:00
parent abd3f06a76
commit 3f6d823aa4
18 changed files with 31 additions and 22 deletions

View File

@@ -1006,6 +1006,12 @@ void cClientHandle::HandleLeftClick(int a_BlockX, int a_BlockY, int a_BlockZ, eB
int BlockY = a_BlockY;
int BlockZ = a_BlockZ;
AddFaceDirection(BlockX, BlockY, BlockZ, a_BlockFace);
if ((BlockY < 0) || (BlockY >= cChunkDef::Height))
{
return;
}
if (cBlockInfo::GetHandler(m_Player->GetWorld()->GetBlock(BlockX, BlockY, BlockZ))->IsClickedThrough())
{
a_BlockX = BlockX;