diff options
author | Howaner <franzi.moos@googlemail.com> | 2014-09-14 14:24:28 +0200 |
---|---|---|
committer | Howaner <franzi.moos@googlemail.com> | 2014-09-14 14:24:28 +0200 |
commit | 382a42b3d6a5b1808ad9c8bfe1494ad44676c14b (patch) | |
tree | 5d2831e83fb505ed4bb4a0199487c675cc18d5ae /src/Protocol/ChunkDataSerializer.cpp | |
parent | Merge branch 'master' into 1.8-Protocol (diff) | |
download | cuberite-382a42b3d6a5b1808ad9c8bfe1494ad44676c14b.tar cuberite-382a42b3d6a5b1808ad9c8bfe1494ad44676c14b.tar.gz cuberite-382a42b3d6a5b1808ad9c8bfe1494ad44676c14b.tar.bz2 cuberite-382a42b3d6a5b1808ad9c8bfe1494ad44676c14b.tar.lz cuberite-382a42b3d6a5b1808ad9c8bfe1494ad44676c14b.tar.xz cuberite-382a42b3d6a5b1808ad9c8bfe1494ad44676c14b.tar.zst cuberite-382a42b3d6a5b1808ad9c8bfe1494ad44676c14b.zip |
Diffstat (limited to 'src/Protocol/ChunkDataSerializer.cpp')
-rw-r--r-- | src/Protocol/ChunkDataSerializer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Protocol/ChunkDataSerializer.cpp b/src/Protocol/ChunkDataSerializer.cpp index 268cf4a9f..61df24c31 100644 --- a/src/Protocol/ChunkDataSerializer.cpp +++ b/src/Protocol/ChunkDataSerializer.cpp @@ -192,8 +192,8 @@ void cChunkDataSerializer::Serialize80(AString & a_Data, int a_ChunkX, int a_Chu { BLOCKTYPE BlockType = m_BlockTypes[Index] & 0xFF; NIBBLETYPE BlockMeta = m_BlockMetas[Index / 2] >> ((Index & 1) * 4) & 0x0f; - Blocks[LastOffset] = (BlockType << 4) | ((unsigned char)BlockMeta); - Blocks[LastOffset + 1] = (unsigned char)BlockType >> 4; + Blocks[LastOffset] = (unsigned char)(BlockType << 4) | BlockMeta; + Blocks[LastOffset + 1] = (unsigned char)(BlockType >> 4); LastOffset += 2; } @@ -215,7 +215,7 @@ void cChunkDataSerializer::Serialize80(AString & a_Data, int a_ChunkX, int a_Chu Packet.WriteBEInt(a_ChunkX); Packet.WriteBEInt(a_ChunkZ); Packet.WriteBool(true); // "Ground-up continuous", or rather, "biome data present" flag - Packet.WriteBEShort(0xffff); // We're aways sending the full chunk with no additional data, so the bitmap is 0xffff + Packet.WriteBEShort((short) 0xffff); // We're aways sending the full chunk with no additional data, so the bitmap is 0xffff Packet.WriteVarInt(DataSize); // Chunk size Packet.WriteBuf(AllData, DataSize); // Chunk data |