Merge pull request #1716 from Raekye/master
filter out leaves meta changes from being sent to the client (resolves #1714)
This commit is contained in:
commit
4a732cc80e
@ -1569,6 +1569,11 @@ void cChunk::FastSetBlock(int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE a_BlockT
|
||||
// Queue block to be sent only if ...
|
||||
if (
|
||||
a_SendToClients && // ... we are told to do so AND ...
|
||||
(
|
||||
!( // ... the old and new blocktypes AREN'T leaves (because the client doesn't need meta updates)
|
||||
((OldBlockType == E_BLOCK_LEAVES) && (a_BlockType == E_BLOCK_LEAVES)) ||
|
||||
((OldBlockType == E_BLOCK_NEW_LEAVES) && (a_BlockType == E_BLOCK_NEW_LEAVES))
|
||||
) && // ... AND ...
|
||||
(
|
||||
(OldBlockMeta != a_BlockMeta) || // ... the meta value is different OR ...
|
||||
!( // ... the old and new blocktypes AREN'T liquids (because client doesn't need to distinguish betwixt them):
|
||||
@ -1579,6 +1584,7 @@ void cChunk::FastSetBlock(int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE a_BlockT
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
{
|
||||
m_PendingSendBlocks.push_back(sSetBlock(m_PosX, m_PosZ, a_RelX, a_RelY, a_RelZ, a_BlockType, a_BlockMeta));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user