summaryrefslogtreecommitdiffstats
path: root/src/Protocol
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-12-24 07:20:17 +0100
committerMattes D <github@xoft.cz>2014-12-24 07:20:17 +0100
commitccdf03daaf880dd0c89a03b50c11eb083ee1cfb0 (patch)
tree445feea29fb0a2228cd8187821a1bf8e519c5807 /src/Protocol
parentAdded Vector3::TurnCW() and Vector3::TurnCCW() (diff)
downloadcuberite-ccdf03daaf880dd0c89a03b50c11eb083ee1cfb0.tar
cuberite-ccdf03daaf880dd0c89a03b50c11eb083ee1cfb0.tar.gz
cuberite-ccdf03daaf880dd0c89a03b50c11eb083ee1cfb0.tar.bz2
cuberite-ccdf03daaf880dd0c89a03b50c11eb083ee1cfb0.tar.lz
cuberite-ccdf03daaf880dd0c89a03b50c11eb083ee1cfb0.tar.xz
cuberite-ccdf03daaf880dd0c89a03b50c11eb083ee1cfb0.tar.zst
cuberite-ccdf03daaf880dd0c89a03b50c11eb083ee1cfb0.zip
Diffstat (limited to 'src/Protocol')
-rw-r--r--src/Protocol/Protocol17x.cpp4
-rw-r--r--src/Protocol/Protocol18x.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/Protocol/Protocol17x.cpp b/src/Protocol/Protocol17x.cpp
index 1e33ec433..34103ea5a 100644
--- a/src/Protocol/Protocol17x.cpp
+++ b/src/Protocol/Protocol17x.cpp
@@ -228,8 +228,8 @@ void cProtocol172::SendBlockChanges(int a_ChunkX, int a_ChunkZ, const sSetBlockV
Pkt.WriteInt((int)a_Changes.size() * 4);
for (sSetBlockVector::const_iterator itr = a_Changes.begin(), end = a_Changes.end(); itr != end; ++itr)
{
- unsigned int Coords = itr->y | (itr->z << 8) | (itr->x << 12);
- unsigned int Blocks = itr->BlockMeta | (itr->BlockType << 4);
+ unsigned int Coords = itr->m_RelY | (itr->m_RelZ << 8) | (itr->m_RelX << 12);
+ unsigned int Blocks = itr->m_BlockMeta | (itr->m_BlockType << 4);
Pkt.WriteInt((Coords << 16) | Blocks);
} // for itr - a_Changes[]
}
diff --git a/src/Protocol/Protocol18x.cpp b/src/Protocol/Protocol18x.cpp
index 1a13f4f7c..72827ac47 100644
--- a/src/Protocol/Protocol18x.cpp
+++ b/src/Protocol/Protocol18x.cpp
@@ -207,9 +207,9 @@ void cProtocol180::SendBlockChanges(int a_ChunkX, int a_ChunkZ, const sSetBlockV
Pkt.WriteVarInt((UInt32)a_Changes.size());
for (sSetBlockVector::const_iterator itr = a_Changes.begin(), end = a_Changes.end(); itr != end; ++itr)
{
- short Coords = (short) (itr->y | (itr->z << 8) | (itr->x << 12));
+ short Coords = (short) (itr->m_RelY | (itr->m_RelZ << 8) | (itr->m_RelX << 12));
Pkt.WriteShort(Coords);
- Pkt.WriteVarInt((itr->BlockType & 0xFFF) << 4 | (itr->BlockMeta & 0xF));
+ Pkt.WriteVarInt((itr->m_BlockType & 0xFFF) << 4 | (itr->m_BlockMeta & 0xF));
} // for itr - a_Changes[]
}