summaryrefslogtreecommitdiffstats
path: root/src/Protocol
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-03-15 14:30:23 +0100
committerMattes D <github@xoft.cz>2015-03-15 14:30:23 +0100
commit0add3d461782b7a89ff614f78f77cbb37476594d (patch)
tree22f4c7f9023efc0554cc0c2b67235b93b8bd82fb /src/Protocol
parentMerge pull request #1811 from mc-server/grass (diff)
parentFixed style violations (diff)
downloadcuberite-0add3d461782b7a89ff614f78f77cbb37476594d.tar
cuberite-0add3d461782b7a89ff614f78f77cbb37476594d.tar.gz
cuberite-0add3d461782b7a89ff614f78f77cbb37476594d.tar.bz2
cuberite-0add3d461782b7a89ff614f78f77cbb37476594d.tar.lz
cuberite-0add3d461782b7a89ff614f78f77cbb37476594d.tar.xz
cuberite-0add3d461782b7a89ff614f78f77cbb37476594d.tar.zst
cuberite-0add3d461782b7a89ff614f78f77cbb37476594d.zip
Diffstat (limited to 'src/Protocol')
-rw-r--r--src/Protocol/Protocol17x.cpp2
-rw-r--r--src/Protocol/Protocol18x.cpp10
2 files changed, 2 insertions, 10 deletions
diff --git a/src/Protocol/Protocol17x.cpp b/src/Protocol/Protocol17x.cpp
index f78c2e54b..9abe81238 100644
--- a/src/Protocol/Protocol17x.cpp
+++ b/src/Protocol/Protocol17x.cpp
@@ -637,7 +637,7 @@ void cProtocol172::SendPaintingSpawn(const cPainting & a_Painting)
Pkt.WriteInt(static_cast<int>(a_Painting.GetPosX()));
Pkt.WriteInt(static_cast<int>(a_Painting.GetPosY()));
Pkt.WriteInt(static_cast<int>(a_Painting.GetPosZ()));
- Pkt.WriteInt(a_Painting.GetDirection());
+ Pkt.WriteInt(a_Painting.GetProtocolFacing());
}
diff --git a/src/Protocol/Protocol18x.cpp b/src/Protocol/Protocol18x.cpp
index 56e3783b6..2d1a473d1 100644
--- a/src/Protocol/Protocol18x.cpp
+++ b/src/Protocol/Protocol18x.cpp
@@ -632,19 +632,11 @@ void cProtocol180::SendPaintingSpawn(const cPainting & a_Painting)
double PosY = a_Painting.GetPosY();
double PosZ = a_Painting.GetPosZ();
- switch (a_Painting.GetDirection())
- {
- case 0: PosZ += 1; break;
- case 1: PosX -= 1; break;
- case 2: PosZ -= 1; break;
- case 3: PosX += 1; break;
- }
-
cPacketizer Pkt(*this, 0x10); // Spawn Painting packet
Pkt.WriteVarInt(a_Painting.GetUniqueID());
Pkt.WriteString(a_Painting.GetName().c_str());
Pkt.WritePosition((int)PosX, (int)PosY, (int)PosZ);
- Pkt.WriteChar(a_Painting.GetDirection());
+ Pkt.WriteChar(a_Painting.GetProtocolFacing());
}