summaryrefslogtreecommitdiffstats
path: root/source/packets/cPacket_Player.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-08-28 23:59:49 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-08-28 23:59:49 +0200
commit1651fcd9807f1033a5fc76e60cb17922e687a7b1 (patch)
treec9b82453023b52b05a61bcfd4c882ab5f6b60e23 /source/packets/cPacket_Player.cpp
parentFixed a few warnings (diff)
downloadcuberite-1651fcd9807f1033a5fc76e60cb17922e687a7b1.tar
cuberite-1651fcd9807f1033a5fc76e60cb17922e687a7b1.tar.gz
cuberite-1651fcd9807f1033a5fc76e60cb17922e687a7b1.tar.bz2
cuberite-1651fcd9807f1033a5fc76e60cb17922e687a7b1.tar.lz
cuberite-1651fcd9807f1033a5fc76e60cb17922e687a7b1.tar.xz
cuberite-1651fcd9807f1033a5fc76e60cb17922e687a7b1.tar.zst
cuberite-1651fcd9807f1033a5fc76e60cb17922e687a7b1.zip
Diffstat (limited to 'source/packets/cPacket_Player.cpp')
-rw-r--r--source/packets/cPacket_Player.cpp87
1 files changed, 0 insertions, 87 deletions
diff --git a/source/packets/cPacket_Player.cpp b/source/packets/cPacket_Player.cpp
index bcfcbfee6..d0acc17d0 100644
--- a/source/packets/cPacket_Player.cpp
+++ b/source/packets/cPacket_Player.cpp
@@ -36,21 +36,6 @@ int cPacket_PlayerAbilities::Parse(cByteBuffer & a_Buffer)
-void cPacket_PlayerAbilities::Serialize(AString & a_Data) const
-{
- char Data[5];
- Data[0] = m_PacketID;
- Data[1] = (char)m_Invulnerable;
- Data[2] = (char)m_IsFlying;
- Data[3] = (char)m_CanFly;
- Data[4] = (char)m_InstaMine;
- a_Data.append(Data, 5);
-}
-
-
-
-
-
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// cPacket_PlayerListItem:
@@ -79,28 +64,6 @@ int cPacket_PlayerListItem::Parse(cByteBuffer & a_Buffer)
-void cPacket_PlayerListItem::Serialize(AString & a_Data) const
-{
- AString PlayerName(m_PlayerName);
- if (PlayerName.length() > 16)
- {
- PlayerName.erase(16);
- }
- else if (PlayerName.length() <= 14)
- {
- PlayerName += cChatColor::White;
- }
-
- AppendByte (a_Data, m_PacketID);
- AppendString16(a_Data, PlayerName);
- AppendBool (a_Data, m_Online);
- AppendShort (a_Data, m_Ping);
-}
-
-
-
-
-
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// cPacket_PlayerLook:
@@ -129,17 +92,6 @@ int cPacket_PlayerLook::Parse(cByteBuffer & a_Buffer)
-void cPacket_PlayerLook::Serialize(AString & a_Data) const
-{
- AppendByte (a_Data, m_PacketID);
- AppendFloat (a_Data, m_Rotation);
- AppendFloat (a_Data, m_Pitch);
- AppendBool (a_Data, m_IsOnGround);
-}
-
-
-
-
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// cPacket_PlayerMoveLook:
@@ -179,26 +131,6 @@ int cPacket_PlayerMoveLook::Parse(cByteBuffer & a_Buffer)
-void cPacket_PlayerMoveLook::Serialize(AString & a_Data) const
-{
- // NOTE that Stance and Y are swapped when sent C->S vs S->C
- // This is the S->C case:
- // LOGD("Send PML: {%0.2f, %0.2f, %0.2f}, Stance: %0.2f, Gnd: %d", m_PosX, m_PosY, m_PosZ, m_Stance, m_IsOnGround ? 1 : 0);
-
- AppendByte (a_Data, m_PacketID);
- AppendDouble(a_Data, m_PosX);
- AppendDouble(a_Data, m_Stance);
- AppendDouble(a_Data, m_PosY);
- AppendDouble(a_Data, m_PosZ);
- AppendFloat (a_Data, m_Rotation);
- AppendFloat (a_Data, m_Pitch);
- AppendBool (a_Data, m_IsOnGround);
-}
-
-
-
-
-
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// cPacket_PlayerPosition:
@@ -232,22 +164,3 @@ int cPacket_PlayerPosition::Parse(cByteBuffer & a_Buffer)
-
-void cPacket_PlayerPosition::Serialize(AString & a_Data) const
-{
- LOGD("Ignore send PlayerPos");
- /*
- LOGD("Send PlayerPos: {%0.2f %0.2f %0.2f}, Stance %0.2f, Gnd: %d", m_PosX, m_PosY, m_PosZ, m_Stance, m_IsOnGround ? 1 : 0);
- // _X: This should not get sent to the client at all - http://wiki.vg/wiki/index.php?title=Protocol&oldid=2513#Player_Position_.280x0B.29
- AppendByte (a_Data, m_PacketID);
- AppendDouble (a_Data, m_PosX);
- AppendDouble (a_Data, m_PosY);
- AppendDouble (a_Data, m_Stance);
- AppendDouble (a_Data, m_PosZ);
- AppendBool (a_Data, m_IsOnGround);
- */
-}
-
-
-
-