1
0

TallGrassGenerator: Fixed crash when too high

This commit is contained in:
STRWarrior 2014-11-10 21:55:13 +01:00
parent 4b95f7c69a
commit 9a50a1fe0c

View File

@ -199,6 +199,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 (