Fixed bug in setting metas
This commit is contained in:
parent
83a7b2333f
commit
cb6200345c
@ -1568,24 +1568,6 @@ void cChunk::FastSetBlock(int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE a_BlockT
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
void cChunk::SetMeta(int a_BlockIdx, NIBBLETYPE a_Meta)
|
|
||||||
{
|
|
||||||
if (GetNibble(m_BlockMeta, a_BlockIdx) == a_Meta)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
MarkDirty();
|
|
||||||
SetNibble(m_BlockMeta, a_BlockIdx, a_Meta);
|
|
||||||
Vector3i Coords(IndexToCoordinate(a_BlockIdx));
|
|
||||||
|
|
||||||
m_PendingSendBlocks.push_back(sSetBlock(m_PosX, m_PosZ, Coords.x, Coords.y, Coords.z, GetBlock(a_BlockIdx), a_Meta));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void cChunk::SendBlockTo(int a_RelX, int a_RelY, int a_RelZ, cClientHandle * a_Client)
|
void cChunk::SendBlockTo(int a_RelX, int a_RelY, int a_RelZ, cClientHandle * a_Client)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -328,7 +328,13 @@ public:
|
|||||||
}
|
}
|
||||||
inline void SetMeta(int a_RelX, int a_RelY, int a_RelZ, NIBBLETYPE a_Meta)
|
inline void SetMeta(int a_RelX, int a_RelY, int a_RelZ, NIBBLETYPE a_Meta)
|
||||||
{
|
{
|
||||||
m_ChunkBuffer.SetMeta(a_RelX, a_RelY, a_RelZ, a_Meta);
|
if (!GetMeta(a_RelX, a_RelY, a_RelZ) == a_Meta)
|
||||||
|
{
|
||||||
|
MarkDirty();
|
||||||
|
m_ChunkBuffer.SetMeta(a_RelX, a_RelY, a_RelZ, a_Meta);
|
||||||
|
|
||||||
|
m_PendingSendBlocks.push_back(sSetBlock(m_PosX, m_PosZ, a_RelX, a_RelY, a_RelZ, GetBlock(a_RelX, a_RelY, a_RelZ), a_Meta));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inline NIBBLETYPE GetBlockLight(int a_RelX, int a_RelY, int a_RelZ) const {return m_ChunkBuffer.GetBlockLight(a_RelX, a_RelY, a_RelZ); }
|
inline NIBBLETYPE GetBlockLight(int a_RelX, int a_RelY, int a_RelZ) const {return m_ChunkBuffer.GetBlockLight(a_RelX, a_RelY, a_RelZ); }
|
||||||
|
Loading…
Reference in New Issue
Block a user