Renamed m_Offset to m_WEOffset

master
STRWarrior 2014-03-11 18:23:21 +01:00
parent 541175d8a0
commit e213e5f9fc
3 changed files with 9 additions and 8 deletions

View File

@ -168,7 +168,7 @@ cBlockArea::cBlockArea(void) :
m_SizeX(0),
m_SizeY(0),
m_SizeZ(0),
m_Offset(0,0,0),
m_WEOffset(0, 0, 0),
m_BlockTypes(NULL),
m_BlockMetas(NULL),
m_BlockLight(NULL),
@ -257,7 +257,7 @@ void cBlockArea::Create(int a_SizeX, int a_SizeY, int a_SizeZ, int a_DataTypes)
void cBlockArea::SetOffset(int a_OffsetX, int a_OffsetY, int a_OffsetZ)
{
m_Offset.Set(a_OffsetX, a_OffsetY, a_OffsetZ);
m_WEOffset.Set(a_OffsetX, a_OffsetY, a_OffsetZ);
}
@ -266,7 +266,7 @@ void cBlockArea::SetOffset(int a_OffsetX, int a_OffsetY, int a_OffsetZ)
void cBlockArea::SetOffset(const Vector3i & a_Offset)
{
m_Offset.Set(a_Offset.x, a_Offset.y, a_Offset.z);
m_WEOffset.Set(a_Offset.x, a_Offset.y, a_Offset.z);
}

View File

@ -221,7 +221,7 @@ public:
NIBBLETYPE GetBlockLight (int a_BlockX, int a_BlockY, int a_BlockZ) const;
NIBBLETYPE GetRelBlockSkyLight(int a_RelX, int a_RelY, int a_RelZ) const;
NIBBLETYPE GetBlockSkyLight (int a_BlockX, int a_BlockY, int a_BlockZ) const;
const Vector3i & GetOffset (void) const {return m_Offset;}
const Vector3i & GetOffset (void) const {return m_WEOffset;}
void SetBlockTypeMeta (int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta);
void SetRelBlockTypeMeta(int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta);
@ -302,7 +302,8 @@ protected:
int m_SizeY;
int m_SizeZ;
Vector3i m_Offset;
// Used for schematics that are created by the WorldEdit plugin. The offset is used for player-relative pasting.
Vector3i m_WEOffset;
BLOCKTYPE * m_BlockTypes;
NIBBLETYPE * m_BlockMetas; // Each meta is stored as a separate byte for faster access

View File

@ -253,9 +253,9 @@ AString cSchematicFileSerializer::SaveToSchematicNBT(const cBlockArea & a_BlockA
Writer.AddByteArray("Data", Dummy.data(), Dummy.size());
}
Writer.AddInt("WEOffsetX", a_BlockArea.m_Offset.x);
Writer.AddInt("WEOffsetY", a_BlockArea.m_Offset.y);
Writer.AddInt("WEOffsetZ", a_BlockArea.m_Offset.z);
Writer.AddInt("WEOffsetX", a_BlockArea.m_WEOffset.x);
Writer.AddInt("WEOffsetY", a_BlockArea.m_WEOffset.y);
Writer.AddInt("WEOffsetZ", a_BlockArea.m_WEOffset.z);
// TODO: Save entities and block entities
Writer.BeginList("Entities", TAG_Compound);