From d5649df326d90361bbf64e2ebb4893caa0499521 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Fri, 6 Jun 2014 23:23:28 +0100 Subject: Further improvements on redstone speed Based on suggestions of @worktycho * Repeaters now walk their data structure only when needed * Fixed a bug with cChunkData returning an incorrect value for whether a meta had changed --- src/ChunkData.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ChunkData.cpp') diff --git a/src/ChunkData.cpp b/src/ChunkData.cpp index 1fa2fd212..f2d220bd2 100644 --- a/src/ChunkData.cpp +++ b/src/ChunkData.cpp @@ -258,7 +258,7 @@ bool cChunkData::SetMeta(int a_RelX, int a_RelY, int a_RelZ, NIBBLETYPE a_Nibble (m_Sections[Section]->m_BlockMetas[Index / 2] & (0xf0 >> ((Index & 1) * 4))) | // The untouched nibble ((a_Nibble & 0x0f) << ((Index & 1) * 4)) // The nibble being set ); - return oldval == a_Nibble; + return oldval != a_Nibble; } -- cgit v1.2.3