1
0
Fork 0

filter out leaves meta changes from being sent to the client

This commit is contained in:
Raekye 2015-01-25 18:23:30 -05:00
parent e6b50b6037
commit 08d84080fa
1 changed files with 4 additions and 0 deletions

View File

@ -1570,6 +1570,10 @@ void cChunk::FastSetBlock(int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE a_BlockT
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))
) || // ... OR ...
(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