summaryrefslogtreecommitdiffstats
path: root/source/packets/cPacket_MultiBlock.cpp
diff options
context:
space:
mode:
authorfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-03-02 14:41:42 +0100
committerfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-03-02 14:41:42 +0100
commiteceead8394188af25c97af1c129bb66a3aa8c0a6 (patch)
treedfffe052679e760bfe11581c51443f21762bcdff /source/packets/cPacket_MultiBlock.cpp
parentMultiBlock packet is working partly.. I really don't understand what's wrong with this packet :/ (diff)
downloadcuberite-eceead8394188af25c97af1c129bb66a3aa8c0a6.tar
cuberite-eceead8394188af25c97af1c129bb66a3aa8c0a6.tar.gz
cuberite-eceead8394188af25c97af1c129bb66a3aa8c0a6.tar.bz2
cuberite-eceead8394188af25c97af1c129bb66a3aa8c0a6.tar.lz
cuberite-eceead8394188af25c97af1c129bb66a3aa8c0a6.tar.xz
cuberite-eceead8394188af25c97af1c129bb66a3aa8c0a6.tar.zst
cuberite-eceead8394188af25c97af1c129bb66a3aa8c0a6.zip
Diffstat (limited to '')
-rw-r--r--source/packets/cPacket_MultiBlock.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/packets/cPacket_MultiBlock.cpp b/source/packets/cPacket_MultiBlock.cpp
index 2c9165d0b..0d73254ed 100644
--- a/source/packets/cPacket_MultiBlock.cpp
+++ b/source/packets/cPacket_MultiBlock.cpp
@@ -57,7 +57,8 @@ void cPacket_MultiBlock::Serialize(AString & a_Data) const
#if (MINECRAFT_1_2_2 == 1)
AppendInteger(a_Data, m_DataSize);
- AppendData (a_Data, (const char*)m_Data, m_DataSize);
+ for( int i = 0; i < m_NumBlocks; ++i )
+ AppendInteger(a_Data, m_Data[i].Data);
#else
AppendData (a_Data, (char *)m_BlockCoordinates, sizeof(short) * m_NumBlocks);
AppendData (a_Data, m_BlockTypes, m_NumBlocks);