summaryrefslogtreecommitdiffstats
path: root/source/cChunk.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-03-24 12:40:29 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-03-24 12:40:29 +0100
commite1ef489e08a91cce377617b99f4c3ed3df5e9d92 (patch)
tree93472b45e79bce29c1be696ced78a7ef6affd45e /source/cChunk.cpp
parentReverted the previous commit - it is useless, since entities still depend heavily on cWorld (diff)
downloadcuberite-e1ef489e08a91cce377617b99f4c3ed3df5e9d92.tar
cuberite-e1ef489e08a91cce377617b99f4c3ed3df5e9d92.tar.gz
cuberite-e1ef489e08a91cce377617b99f4c3ed3df5e9d92.tar.bz2
cuberite-e1ef489e08a91cce377617b99f4c3ed3df5e9d92.tar.lz
cuberite-e1ef489e08a91cce377617b99f4c3ed3df5e9d92.tar.xz
cuberite-e1ef489e08a91cce377617b99f4c3ed3df5e9d92.tar.zst
cuberite-e1ef489e08a91cce377617b99f4c3ed3df5e9d92.zip
Diffstat (limited to 'source/cChunk.cpp')
-rw-r--r--source/cChunk.cpp13
1 files changed, 0 insertions, 13 deletions
diff --git a/source/cChunk.cpp b/source/cChunk.cpp
index e48ababd0..54fbf4b94 100644
--- a/source/cChunk.cpp
+++ b/source/cChunk.cpp
@@ -372,30 +372,17 @@ void cChunk::Tick(float a_Dt, MTRand & a_TickRandom)
MultiBlock.m_ChunkX = m_PosX;
MultiBlock.m_ChunkZ = m_PosZ;
MultiBlock.m_NumBlocks = (short)PendingSendBlocks;
-#if (MINECRAFT_1_2_2 == 1)
MultiBlock.m_Data = new cPacket_MultiBlock::sBlockChange[ PendingSendBlocks ];
MultiBlock.m_DataSize = PendingSendBlocks * sizeof( cPacket_MultiBlock::sBlockChange );
-#else
- MultiBlock.m_BlockCoordinates = new unsigned short[PendingSendBlocks];
- MultiBlock.m_BlockTypes = new char[PendingSendBlocks];
- MultiBlock.m_BlockMetas = new char[PendingSendBlocks];
-#endif
//LOG("Sending multiblock packet for %i blocks", PendingSendBlocks );
for( unsigned int i = 0; i < PendingSendBlocks; i++)
{
unsigned int index = m_PendingSendBlocks[i];
Vector3i BlockPos = IndexToCoordinate( index );
-#if (MINECRAFT_1_2_2 == 1)
unsigned int Coords = BlockPos.y | (BlockPos.z << 8) | (BlockPos.x << 12);
unsigned int Blocks = GetNibble( m_BlockMeta, index ) | (m_BlockTypes[index] << 4);
MultiBlock.m_Data[i].Data = Coords << 16 | Blocks;
-#else
- MultiBlock.m_BlockCoordinates[i] = (BlockPos.z&0xf) | (BlockPos.x&0xf)<<4 | (BlockPos.y&0xff)<<8;
- //LOG("X: %i Y: %i Z: %i Combo: 0x%04x", X, Y, Z, MultiBlock.m_BlockCoordinates[i] );
- MultiBlock.m_BlockTypes[i] = m_BlockTypes[index];
- MultiBlock.m_BlockMetas[i] = GetNibble( m_BlockMeta, index );
-#endif
}
m_PendingSendBlocks.clear();
PendingSendBlocks = m_PendingSendBlocks.size();