summaryrefslogtreecommitdiffstats
path: root/source/packets
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-08-27 19:31:16 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-08-27 19:31:16 +0200
commit66f4c9e0c08762fb4668792999c6200e9fd78c89 (patch)
treeaf89423afb69f78251a16eb041e88cca9ebef478 /source/packets
parentgit-svn-id: http://mc-server.googlecode.com/svn/trunk@795 0a769ca7-a7f5-676a-18bf-c427514a06d6 (diff)
downloadcuberite-66f4c9e0c08762fb4668792999c6200e9fd78c89.tar
cuberite-66f4c9e0c08762fb4668792999c6200e9fd78c89.tar.gz
cuberite-66f4c9e0c08762fb4668792999c6200e9fd78c89.tar.bz2
cuberite-66f4c9e0c08762fb4668792999c6200e9fd78c89.tar.lz
cuberite-66f4c9e0c08762fb4668792999c6200e9fd78c89.tar.xz
cuberite-66f4c9e0c08762fb4668792999c6200e9fd78c89.tar.zst
cuberite-66f4c9e0c08762fb4668792999c6200e9fd78c89.zip
Diffstat (limited to '')
-rw-r--r--source/packets/cPacket.h9
-rw-r--r--source/packets/cPacket_13.h2
-rw-r--r--source/packets/cPacket_Player.cpp12
-rw-r--r--source/packets/cPacket_Player.h2
4 files changed, 14 insertions, 11 deletions
diff --git a/source/packets/cPacket.h b/source/packets/cPacket.h
index 1d6e8506f..bc0f052e8 100644
--- a/source/packets/cPacket.h
+++ b/source/packets/cPacket.h
@@ -9,9 +9,12 @@
-#define PACKET_INCOMPLETE -2
-#define PACKET_ERROR -1
-#define PACKET_OK 1
+enum
+{
+ PACKET_INCOMPLETE = -2,
+ PACKET_ERROR = -1,
+ PACKET_OK = 1,
+} ;
diff --git a/source/packets/cPacket_13.h b/source/packets/cPacket_13.h
index 24caf5cc0..c9f274b38 100644
--- a/source/packets/cPacket_13.h
+++ b/source/packets/cPacket_13.h
@@ -18,7 +18,7 @@ public:
cPacket_13()
: m_EntityID( 0 )
, m_ActionID( 0 )
- { m_PacketID = E_PACKET_13; }
+ { m_PacketID = E_PACKET_ENTITY_ACTION; }
virtual cPacket* Clone() const { return new cPacket_13( *this ); }
virtual int Parse(cByteBuffer & a_Buffer) override;
diff --git a/source/packets/cPacket_Player.cpp b/source/packets/cPacket_Player.cpp
index 2136d63e6..bcfcbfee6 100644
--- a/source/packets/cPacket_Player.cpp
+++ b/source/packets/cPacket_Player.cpp
@@ -202,15 +202,15 @@ void cPacket_PlayerMoveLook::Serialize(AString & a_Data) const
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// cPacket_PlayerPosition:
-cPacket_PlayerPosition::cPacket_PlayerPosition(cPlayer * a_Player)
+cPacket_PlayerPosition::cPacket_PlayerPosition(const cPlayer & a_Player)
{
m_PacketID = E_PLAYERPOS;
- m_PosX = a_Player->GetPosX();
- m_PosY = a_Player->GetPosY();
- m_PosZ = a_Player->GetPosZ();
- m_Stance = a_Player->GetStance();
- m_IsOnGround = a_Player->IsOnGround();
+ m_PosX = a_Player.GetPosX();
+ m_PosY = a_Player.GetPosY();
+ m_PosZ = a_Player.GetPosZ();
+ m_Stance = a_Player.GetStance();
+ m_IsOnGround = a_Player.IsOnGround();
}
diff --git a/source/packets/cPacket_Player.h b/source/packets/cPacket_Player.h
index af2dbcc34..9d80eedc9 100644
--- a/source/packets/cPacket_Player.h
+++ b/source/packets/cPacket_Player.h
@@ -131,7 +131,7 @@ public:
class cPacket_PlayerPosition : public cPacket
{
public:
- cPacket_PlayerPosition( cPlayer* a_Player );
+ cPacket_PlayerPosition(const cPlayer & a_Player);
cPacket_PlayerPosition()
: m_PosX( 0.0 )
, m_PosY( 0.0 )