1
0

fix logic bug in cChunk::FastSetBlock filtering out leaves meta changes

- send update if it's not a leaves block and (the original checks)
This commit is contained in:
Raekye 2015-01-25 19:13:55 -05:00
parent 08d84080fa
commit 82a10116dd

View File

@ -1573,7 +1573,8 @@ void cChunk::FastSetBlock(int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE a_BlockT
!( // ... 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))
) || // ... OR ...
) && // ... 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):
((OldBlockType == E_BLOCK_STATIONARY_WATER) && (a_BlockType == E_BLOCK_WATER)) || // Replacing stationary water with water
@ -1583,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));
}