1
0
Fork 0

Removed y for-loop.

Only the top block now gets long grass.
This commit is contained in:
STRWarrior 2014-07-21 16:01:16 +02:00
parent 0c816dd697
commit ce956bcdf2
1 changed files with 28 additions and 28 deletions

View File

@ -178,8 +178,9 @@ void cFinishGenTallGrass::GenFinish(cChunkDesc & a_ChunkDesc)
continue;
}
for (int y = a_ChunkDesc.GetHeight(x, z) + 1; y >= 1; y--)
{
// Get the top block + 1. This is the place where the grass would finaly be placed.
int y = a_ChunkDesc.GetHeight(x, z) + 1;
// Check if long grass can be placed.
if (
(a_ChunkDesc.GetBlockType(x, y, z) != E_BLOCK_AIR) ||
@ -211,7 +212,6 @@ void cFinishGenTallGrass::GenFinish(cChunkDesc & a_ChunkDesc)
}
}
}
}
}