1
0

Fixed a crash in redstone simulator when destroying blocks in Y < 2

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1084 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com 2012-12-20 13:56:42 +00:00
parent 9d5a1a9f6d
commit af66f8ebae

View File

@ -456,6 +456,10 @@ int cRedstoneSimulator::UnPowerBlock( const Vector3i & a_BlockPos, const Vector3
{
BLOCKTYPE BlockType;
NIBBLETYPE BlockMeta;
if ((a_BlockPos.y < 0) || (a_BlockPos.y >= cChunkDef::Height))
{
return 0;
}
m_World->GetBlockTypeMeta(a_BlockPos.x, a_BlockPos.y, a_BlockPos.z, BlockType, BlockMeta);
switch (BlockType)
{