summaryrefslogtreecommitdiffstats
path: root/src/BlockArea.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-02-24 09:34:00 +0100
committermadmaxoft <github@xoft.cz>2014-02-24 09:34:37 +0100
commit0aa8f765f99f14f6f1cc8260784213da60a3b946 (patch)
treed9dcd84c00087272dec8c56ac72a3c6716016255 /src/BlockArea.cpp
parentFixed a possible crash in cWorld::WakeUpSimulatorsInArea(). (diff)
downloadcuberite-0aa8f765f99f14f6f1cc8260784213da60a3b946.tar
cuberite-0aa8f765f99f14f6f1cc8260784213da60a3b946.tar.gz
cuberite-0aa8f765f99f14f6f1cc8260784213da60a3b946.tar.bz2
cuberite-0aa8f765f99f14f6f1cc8260784213da60a3b946.tar.lz
cuberite-0aa8f765f99f14f6f1cc8260784213da60a3b946.tar.xz
cuberite-0aa8f765f99f14f6f1cc8260784213da60a3b946.tar.zst
cuberite-0aa8f765f99f14f6f1cc8260784213da60a3b946.zip
Diffstat (limited to '')
-rw-r--r--src/BlockArea.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/BlockArea.cpp b/src/BlockArea.cpp
index 194e2d68a..df154d3af 100644
--- a/src/BlockArea.cpp
+++ b/src/BlockArea.cpp
@@ -878,7 +878,7 @@ void cBlockArea::RotateCCW(void)
int NewX = z;
for (int y = 0; y < m_SizeY; y++)
{
- int NewIdx = NewX + NewZ * m_SizeX + y * m_SizeX * m_SizeZ;
+ int NewIdx = NewX + NewZ * m_SizeZ + y * m_SizeX * m_SizeZ;
int OldIdx = MakeIndex(x, y, z);
NewTypes[NewIdx] = m_BlockTypes[OldIdx];
NewMetas[NewIdx] = BlockHandler(m_BlockTypes[OldIdx])->MetaRotateCCW(m_BlockMetas[OldIdx]);
@@ -923,7 +923,7 @@ void cBlockArea::RotateCW(void)
int NewX = m_SizeZ - z - 1;
for (int y = 0; y < m_SizeY; y++)
{
- int NewIdx = NewX + NewZ * m_SizeX + y * m_SizeX * m_SizeZ;
+ int NewIdx = NewX + NewZ * m_SizeZ + y * m_SizeX * m_SizeZ;
int OldIdx = MakeIndex(x, y, z);
NewTypes[NewIdx] = m_BlockTypes[OldIdx];
NewMetas[NewIdx] = BlockHandler(m_BlockTypes[OldIdx])->MetaRotateCW(m_BlockMetas[OldIdx]);
@@ -1075,7 +1075,7 @@ void cBlockArea::RotateCCWNoMeta(void)
int NewX = z;
for (int y = 0; y < m_SizeY; y++)
{
- NewTypes[NewX + NewZ * m_SizeX + y * m_SizeX * m_SizeZ] = m_BlockTypes[MakeIndex(x, y, z)];
+ NewTypes[NewX + NewZ * m_SizeZ + y * m_SizeX * m_SizeZ] = m_BlockTypes[MakeIndex(x, y, z)];
} // for y
} // for z
} // for x
@@ -1093,7 +1093,7 @@ void cBlockArea::RotateCCWNoMeta(void)
int NewX = z;
for (int y = 0; y < m_SizeY; y++)
{
- NewMetas[NewX + NewZ * m_SizeX + y * m_SizeX * m_SizeZ] = m_BlockMetas[MakeIndex(x, y, z)];
+ NewMetas[NewX + NewZ * m_SizeZ + y * m_SizeX * m_SizeZ] = m_BlockMetas[MakeIndex(x, y, z)];
} // for y
} // for z
} // for x
@@ -1120,7 +1120,7 @@ void cBlockArea::RotateCWNoMeta(void)
int NewZ = x;
for (int y = 0; y < m_SizeY; y++)
{
- NewTypes[NewX + NewZ * m_SizeX + y * m_SizeX * m_SizeZ] = m_BlockTypes[MakeIndex(x, y, z)];
+ NewTypes[NewX + NewZ * m_SizeZ + y * m_SizeX * m_SizeZ] = m_BlockTypes[MakeIndex(x, y, z)];
} // for y
} // for x
} // for z
@@ -1138,7 +1138,7 @@ void cBlockArea::RotateCWNoMeta(void)
int NewZ = x;
for (int y = 0; y < m_SizeY; y++)
{
- NewMetas[NewX + NewZ * m_SizeX + y * m_SizeX * m_SizeZ] = m_BlockMetas[MakeIndex(x, y, z)];
+ NewMetas[NewX + NewZ * m_SizeZ + y * m_SizeX * m_SizeZ] = m_BlockMetas[MakeIndex(x, y, z)];
} // for y
} // for x
} // for z