TallGrassGenerator: Fixed crash when too high
This commit is contained in:
parent
4b95f7c69a
commit
9a50a1fe0c
@ -200,6 +200,11 @@ void cFinishGenTallGrass::GenFinish(cChunkDesc & a_ChunkDesc)
|
|||||||
// Get the top block + 1. This is the place where the grass would finaly be placed:
|
// Get the top block + 1. This is the place where the grass would finaly be placed:
|
||||||
int y = a_ChunkDesc.GetHeight(x, z) + 1;
|
int y = a_ChunkDesc.GetHeight(x, z) + 1;
|
||||||
|
|
||||||
|
if (y >= 255)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// Check if long grass can be placed:
|
// Check if long grass can be placed:
|
||||||
if (
|
if (
|
||||||
(a_ChunkDesc.GetBlockType(x, y, z) != E_BLOCK_AIR) ||
|
(a_ChunkDesc.GetBlockType(x, y, z) != E_BLOCK_AIR) ||
|
||||||
|
Loading…
Reference in New Issue
Block a user