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-19 13:51:17 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-08-19 13:51:17 +0200
commiteb3ed1aec1fb9e4468a7829cabd42572b7554d70 (patch)
tree4b5f428bf612785af8c306ba40f46c66fe0681a0 /source/packets/cPacket_Player.cpp
parentFixed Bug #236 (diff)
downloadcuberite-eb3ed1aec1fb9e4468a7829cabd42572b7554d70.tar
cuberite-eb3ed1aec1fb9e4468a7829cabd42572b7554d70.tar.gz
cuberite-eb3ed1aec1fb9e4468a7829cabd42572b7554d70.tar.bz2
cuberite-eb3ed1aec1fb9e4468a7829cabd42572b7554d70.tar.lz
cuberite-eb3ed1aec1fb9e4468a7829cabd42572b7554d70.tar.xz
cuberite-eb3ed1aec1fb9e4468a7829cabd42572b7554d70.tar.zst
cuberite-eb3ed1aec1fb9e4468a7829cabd42572b7554d70.zip
Diffstat (limited to 'source/packets/cPacket_Player.cpp')
-rw-r--r--source/packets/cPacket_Player.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/source/packets/cPacket_Player.cpp b/source/packets/cPacket_Player.cpp
index 3a897a1ea..c24905e15 100644
--- a/source/packets/cPacket_Player.cpp
+++ b/source/packets/cPacket_Player.cpp
@@ -106,10 +106,10 @@ void cPacket_PlayerListItem::Serialize(AString & a_Data) const
cPacket_PlayerLook::cPacket_PlayerLook( cPlayer* a_Player )
{
- m_PacketID = E_PLAYERLOOK;
- m_Rotation = a_Player->GetRotation();
- m_Pitch = a_Player->GetPitch();
- m_bFlying = a_Player->GetFlying();
+ m_PacketID = E_PLAYERLOOK;
+ m_Rotation = a_Player->GetRotation();
+ m_Pitch = a_Player->GetPitch();
+ m_IsOnGround = a_Player->IsOnGround();
}
@@ -119,9 +119,9 @@ cPacket_PlayerLook::cPacket_PlayerLook( cPlayer* a_Player )
int cPacket_PlayerLook::Parse(cByteBuffer & a_Buffer)
{
int TotalBytes = 0;
- HANDLE_PACKET_READ(ReadBEFloat, m_Rotation, TotalBytes);
- HANDLE_PACKET_READ(ReadBEFloat, m_Pitch, TotalBytes);
- HANDLE_PACKET_READ(ReadBool, m_bFlying, TotalBytes);
+ HANDLE_PACKET_READ(ReadBEFloat, m_Rotation, TotalBytes);
+ HANDLE_PACKET_READ(ReadBEFloat, m_Pitch, TotalBytes);
+ HANDLE_PACKET_READ(ReadBool, m_IsOnGround, TotalBytes);
return TotalBytes;
}
@@ -134,7 +134,7 @@ 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_bFlying);
+ AppendBool (a_Data, m_IsOnGround);
}
@@ -145,14 +145,14 @@ void cPacket_PlayerLook::Serialize(AString & a_Data) const
cPacket_PlayerMoveLook::cPacket_PlayerMoveLook( cPlayer* a_Player )
{
- m_PacketID = E_PLAYERMOVELOOK;
- m_PosX = a_Player->GetPosX();
- m_PosY = a_Player->GetPosY() + 1.65;
- m_PosZ = a_Player->GetPosZ();
- m_Stance = a_Player->GetStance();
- m_Rotation = a_Player->GetRotation();
- m_Pitch = a_Player->GetPitch();
- m_bFlying = a_Player->GetFlying();
+ m_PacketID = E_PLAYERMOVELOOK;
+ m_PosX = a_Player->GetPosX();
+ m_PosY = a_Player->GetPosY() + 1.65;
+ m_PosZ = a_Player->GetPosZ();
+ m_Stance = a_Player->GetStance();
+ m_Rotation = a_Player->GetRotation();
+ m_Pitch = a_Player->GetPitch();
+ m_IsOnGround = a_Player->IsOnGround();
}
@@ -162,13 +162,13 @@ cPacket_PlayerMoveLook::cPacket_PlayerMoveLook( cPlayer* a_Player )
int cPacket_PlayerMoveLook::Parse(cByteBuffer & a_Buffer)
{
int TotalBytes = 0;
- HANDLE_PACKET_READ(ReadBEDouble, m_PosX, TotalBytes);
- HANDLE_PACKET_READ(ReadBEDouble, m_PosY, TotalBytes);
- HANDLE_PACKET_READ(ReadBEDouble, m_Stance, TotalBytes);
- HANDLE_PACKET_READ(ReadBEDouble, m_PosZ, TotalBytes);
- HANDLE_PACKET_READ(ReadBEFloat, m_Rotation, TotalBytes);
- HANDLE_PACKET_READ(ReadBEFloat, m_Pitch, TotalBytes);
- HANDLE_PACKET_READ(ReadBool, m_bFlying, TotalBytes);
+ HANDLE_PACKET_READ(ReadBEDouble, m_PosX, TotalBytes);
+ HANDLE_PACKET_READ(ReadBEDouble, m_PosY, TotalBytes);
+ HANDLE_PACKET_READ(ReadBEDouble, m_Stance, TotalBytes);
+ HANDLE_PACKET_READ(ReadBEDouble, m_PosZ, TotalBytes);
+ HANDLE_PACKET_READ(ReadBEFloat, m_Rotation, TotalBytes);
+ HANDLE_PACKET_READ(ReadBEFloat, m_Pitch, TotalBytes);
+ HANDLE_PACKET_READ(ReadBool, m_IsOnGround, TotalBytes);
return TotalBytes;
}
@@ -185,7 +185,7 @@ void cPacket_PlayerMoveLook::Serialize(AString & a_Data) const
AppendDouble(a_Data, m_PosZ);
AppendFloat (a_Data, m_Rotation);
AppendFloat (a_Data, m_Pitch);
- AppendBool (a_Data, m_bFlying);
+ AppendBool (a_Data, m_IsOnGround);
}