1
0

fix block area rotation bug (#4243)

fix mirror method bug in class cBlockArea.
This commit is contained in:
changyong guo 2018-06-26 00:31:05 +08:00 committed by Mattes D
parent 03c977a200
commit be1f06520c

View File

@ -1200,7 +1200,7 @@ void cBlockArea::MirrorXY(void)
int MaxZ = m_Size.z - 1;
for (int y = 0; y < m_Size.y; y++)
{
for (int z = 0; z <= HalfZ; z++)
for (int z = 0; z < HalfZ; z++)
{
for (int x = 0; x < m_Size.x; x++)
{
@ -1255,7 +1255,7 @@ void cBlockArea::MirrorXZ(void)
// We are guaranteed that both blocktypes and blockmetas exist; mirror both at the same time:
int HalfY = m_Size.y / 2;
int MaxY = m_Size.y - 1;
for (int y = 0; y <= HalfY; y++)
for (int y = 0; y < HalfY; y++)
{
for (int z = 0; z < m_Size.z; z++)
{
@ -1316,7 +1316,7 @@ void cBlockArea::MirrorYZ(void)
{
for (int z = 0; z < m_Size.z; z++)
{
for (int x = 0; x <= HalfX; x++)
for (int x = 0; x < HalfX; x++)
{
auto Idx1 = MakeIndex(x, y, z);
auto Idx2 = MakeIndex(MaxX - x, y, z);