parent
9f321e29cf
commit
365d2447d0
@ -152,7 +152,7 @@ bool HasNearLog(cBlockArea & a_Area, int a_BlockX, int a_BlockY, int a_BlockZ)
|
|||||||
a_Area.SetBlockType(a_BlockX, a_BlockY, a_BlockZ, E_BLOCK_SPONGE);
|
a_Area.SetBlockType(a_BlockX, a_BlockY, a_BlockZ, E_BLOCK_SPONGE);
|
||||||
for (int i = 0; i < LEAVES_CHECK_DISTANCE; i++)
|
for (int i = 0; i < LEAVES_CHECK_DISTANCE; i++)
|
||||||
{
|
{
|
||||||
for (int y = a_BlockY - i; y <= a_BlockY + i; y++)
|
for (int y = std::max(a_BlockY - i, 0); y <= std::min(a_BlockY + i, 255); y++)
|
||||||
{
|
{
|
||||||
for (int z = a_BlockZ - i; z <= a_BlockZ + i; z++)
|
for (int z = a_BlockZ - i; z <= a_BlockZ + i; z++)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user