cBlockArea: Fixed type / meta copypasta errors in mirroring and rotation code
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1318 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
parent
7ac3131984
commit
b0397f7273
@ -919,8 +919,14 @@ void cBlockArea::RelLine(int a_RelX1, int a_RelY1, int a_RelZ1, int a_RelX2, int
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
void cBlockArea::RotateCW(void)
|
void cBlockArea::RotateCCW(void)
|
||||||
{
|
{
|
||||||
|
if (!HasBlockTypes())
|
||||||
|
{
|
||||||
|
LOGWARNING("cBlockArea: Cannot rotate meta without blocktypes!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
ASSERT(!"Not implemented yet");
|
ASSERT(!"Not implemented yet");
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
@ -929,8 +935,14 @@ void cBlockArea::RotateCW(void)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
void cBlockArea::RotateCCW(void)
|
void cBlockArea::RotateCW(void)
|
||||||
{
|
{
|
||||||
|
if (!HasBlockTypes())
|
||||||
|
{
|
||||||
|
LOGWARNING("cBlockArea: Cannot rotate meta without blocktypes!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
ASSERT(!"Not implemented yet");
|
ASSERT(!"Not implemented yet");
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
@ -941,6 +953,12 @@ void cBlockArea::RotateCCW(void)
|
|||||||
|
|
||||||
void cBlockArea::MirrorXY(void)
|
void cBlockArea::MirrorXY(void)
|
||||||
{
|
{
|
||||||
|
if (!HasBlockTypes())
|
||||||
|
{
|
||||||
|
LOGWARNING("cBlockArea: Cannot mirror meta without blocktypes!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
ASSERT(!"Not implemented yet");
|
ASSERT(!"Not implemented yet");
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
@ -951,6 +969,12 @@ void cBlockArea::MirrorXY(void)
|
|||||||
|
|
||||||
void cBlockArea::MirrorXZ(void)
|
void cBlockArea::MirrorXZ(void)
|
||||||
{
|
{
|
||||||
|
if (!HasBlockTypes())
|
||||||
|
{
|
||||||
|
LOGWARNING("cBlockArea: Cannot mirror meta without blocktypes!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
ASSERT(!"Not implemented yet");
|
ASSERT(!"Not implemented yet");
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
@ -961,6 +985,12 @@ void cBlockArea::MirrorXZ(void)
|
|||||||
|
|
||||||
void cBlockArea::MirrorYZ(void)
|
void cBlockArea::MirrorYZ(void)
|
||||||
{
|
{
|
||||||
|
if (!HasBlockTypes())
|
||||||
|
{
|
||||||
|
LOGWARNING("cBlockArea: Cannot mirror meta without blocktypes!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
ASSERT(!"Not implemented yet");
|
ASSERT(!"Not implemented yet");
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
@ -989,7 +1019,7 @@ void cBlockArea::RotateCCWNoMeta(void)
|
|||||||
std::swap(m_BlockTypes, NewTypes);
|
std::swap(m_BlockTypes, NewTypes);
|
||||||
delete[] NewTypes;
|
delete[] NewTypes;
|
||||||
}
|
}
|
||||||
if (HasBlockTypes())
|
if (HasBlockMetas())
|
||||||
{
|
{
|
||||||
NIBBLETYPE * NewMetas = new NIBBLETYPE[m_SizeX * m_SizeY * m_SizeZ];
|
NIBBLETYPE * NewMetas = new NIBBLETYPE[m_SizeX * m_SizeY * m_SizeZ];
|
||||||
for (int x = 0; x < m_SizeX; x++)
|
for (int x = 0; x < m_SizeX; x++)
|
||||||
@ -1034,7 +1064,7 @@ void cBlockArea::RotateCWNoMeta(void)
|
|||||||
std::swap(m_BlockTypes, NewTypes);
|
std::swap(m_BlockTypes, NewTypes);
|
||||||
delete[] NewTypes;
|
delete[] NewTypes;
|
||||||
}
|
}
|
||||||
if (HasBlockTypes())
|
if (HasBlockMetas())
|
||||||
{
|
{
|
||||||
NIBBLETYPE * NewMetas = new NIBBLETYPE[m_SizeX * m_SizeY * m_SizeZ];
|
NIBBLETYPE * NewMetas = new NIBBLETYPE[m_SizeX * m_SizeY * m_SizeZ];
|
||||||
for (int z = 0; z < m_SizeZ; z++)
|
for (int z = 0; z < m_SizeZ; z++)
|
||||||
@ -1089,7 +1119,7 @@ void cBlockArea::MirrorXYNoMeta(void)
|
|||||||
} // for x
|
} // for x
|
||||||
} // for z
|
} // for z
|
||||||
} // for y
|
} // for y
|
||||||
} // if (HasBlockTypes)
|
} // if (HasBlockMetas)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1126,7 +1156,7 @@ void cBlockArea::MirrorXZNoMeta(void)
|
|||||||
} // for x
|
} // for x
|
||||||
} // for z
|
} // for z
|
||||||
} // for y
|
} // for y
|
||||||
} // if (HasBlockTypes)
|
} // if (HasBlockMetas)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1163,7 +1193,7 @@ void cBlockArea::MirrorYZNoMeta(void)
|
|||||||
} // for x
|
} // for x
|
||||||
} // for z
|
} // for z
|
||||||
} // for y
|
} // for y
|
||||||
} // if (HasBlockTypes)
|
} // if (HasBlockMetas)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -149,12 +149,12 @@ public:
|
|||||||
NIBBLETYPE a_BlockLight = 0, NIBBLETYPE a_BlockSkyLight = 0x0f
|
NIBBLETYPE a_BlockLight = 0, NIBBLETYPE a_BlockSkyLight = 0x0f
|
||||||
);
|
);
|
||||||
|
|
||||||
/// Rotates the entire area clockwise around the Y axis
|
|
||||||
void RotateCW(void);
|
|
||||||
|
|
||||||
/// Rotates the entire area counter-clockwise around the Y axis
|
/// Rotates the entire area counter-clockwise around the Y axis
|
||||||
void RotateCCW(void);
|
void RotateCCW(void);
|
||||||
|
|
||||||
|
/// Rotates the entire area clockwise around the Y axis
|
||||||
|
void RotateCW(void);
|
||||||
|
|
||||||
/// Mirrors the entire area around the XY plane
|
/// Mirrors the entire area around the XY plane
|
||||||
void MirrorXY(void);
|
void MirrorXY(void);
|
||||||
|
|
||||||
@ -164,12 +164,12 @@ public:
|
|||||||
/// Mirrors the entire area around the YZ plane
|
/// Mirrors the entire area around the YZ plane
|
||||||
void MirrorYZ(void);
|
void MirrorYZ(void);
|
||||||
|
|
||||||
/// Rotates the entire area clockwise around the Y axis, doesn't use blockhandlers for block meta
|
|
||||||
void RotateCWNoMeta(void);
|
|
||||||
|
|
||||||
/// Rotates the entire area counter-clockwise around the Y axis, doesn't use blockhandlers for block meta
|
/// Rotates the entire area counter-clockwise around the Y axis, doesn't use blockhandlers for block meta
|
||||||
void RotateCCWNoMeta(void);
|
void RotateCCWNoMeta(void);
|
||||||
|
|
||||||
|
/// Rotates the entire area clockwise around the Y axis, doesn't use blockhandlers for block meta
|
||||||
|
void RotateCWNoMeta(void);
|
||||||
|
|
||||||
/// Mirrors the entire area around the XY plane, doesn't use blockhandlers for block meta
|
/// Mirrors the entire area around the XY plane, doesn't use blockhandlers for block meta
|
||||||
void MirrorXYNoMeta(void);
|
void MirrorXYNoMeta(void);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user