summaryrefslogtreecommitdiffstats
path: root/src/Protocol/ProtocolRecognizer.cpp
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-07-26 13:27:27 +0200
committerHowaner <franzi.moos@googlemail.com>2014-07-26 13:27:27 +0200
commitef4d68adfd70488df0887f3a5fba1c9aad7a0108 (patch)
tree1ea3acb0e6b16e8badf7d1d56301bf3dd3a5d99e /src/Protocol/ProtocolRecognizer.cpp
parentAdd armor items directly to the armor slots. (diff)
parentGit: Ignore AllFiles.lst (generated by cmake) (diff)
downloadcuberite-ef4d68adfd70488df0887f3a5fba1c9aad7a0108.tar
cuberite-ef4d68adfd70488df0887f3a5fba1c9aad7a0108.tar.gz
cuberite-ef4d68adfd70488df0887f3a5fba1c9aad7a0108.tar.bz2
cuberite-ef4d68adfd70488df0887f3a5fba1c9aad7a0108.tar.lz
cuberite-ef4d68adfd70488df0887f3a5fba1c9aad7a0108.tar.xz
cuberite-ef4d68adfd70488df0887f3a5fba1c9aad7a0108.tar.zst
cuberite-ef4d68adfd70488df0887f3a5fba1c9aad7a0108.zip
Diffstat (limited to 'src/Protocol/ProtocolRecognizer.cpp')
-rw-r--r--src/Protocol/ProtocolRecognizer.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/Protocol/ProtocolRecognizer.cpp b/src/Protocol/ProtocolRecognizer.cpp
index d3aae65fe..bf46a15ef 100644
--- a/src/Protocol/ProtocolRecognizer.cpp
+++ b/src/Protocol/ProtocolRecognizer.cpp
@@ -331,7 +331,7 @@ void cProtocolRecognizer::SendEntityVelocity(const cEntity & a_Entity)
void cProtocolRecognizer::SendExplosion(double a_BlockX, double a_BlockY, double a_BlockZ, float a_Radius, const cVector3iArray & a_BlocksAffected, const Vector3d & a_PlayerMotion)
{
ASSERT(m_Protocol != NULL);
- m_Protocol->SendExplosion(a_BlockX,a_BlockY,a_BlockZ,a_Radius, a_BlocksAffected, a_PlayerMotion);
+ m_Protocol->SendExplosion(a_BlockX, a_BlockY, a_BlockZ, a_Radius, a_BlocksAffected, a_PlayerMotion);
}
@@ -756,7 +756,7 @@ void cProtocolRecognizer::SendUpdateSign(int a_BlockX, int a_BlockY, int a_Block
-void cProtocolRecognizer::SendUseBed(const cEntity & a_Entity, int a_BlockX, int a_BlockY, int a_BlockZ )
+void cProtocolRecognizer::SendUseBed(const cEntity & a_Entity, int a_BlockX, int a_BlockY, int a_BlockZ)
{
ASSERT(m_Protocol != NULL);
m_Protocol->SendUseBed(a_Entity, a_BlockX, a_BlockY, a_BlockZ);
@@ -953,7 +953,6 @@ bool cProtocolRecognizer::TryRecognizeLengthlessProtocol(void)
bool cProtocolRecognizer::TryRecognizeLengthedProtocol(UInt32 a_PacketLengthRemaining)
{
UInt32 PacketType;
- UInt32 NumBytesRead = (UInt32)m_Buffer.GetReadableSpace();
if (!m_Buffer.ReadVarInt(PacketType))
{
return false;
@@ -972,7 +971,6 @@ bool cProtocolRecognizer::TryRecognizeLengthedProtocol(UInt32 a_PacketLengthRema
{
return false;
}
- NumBytesRead -= (UInt32)m_Buffer.GetReadableSpace();
switch (ProtocolVersion)
{
case PROTO_VERSION_1_7_2:
@@ -1023,9 +1021,9 @@ void cProtocolRecognizer::SendLengthlessServerPing(void)
// http://wiki.vg/wiki/index.php?title=Protocol&oldid=3099#Server_List_Ping_.280xFE.29
Printf(Reply, "%s%s%i%s%i",
Server->GetDescription().c_str(),
- cChatColor::Delimiter.c_str(),
+ cChatColor::Delimiter,
Server->GetNumPlayers(),
- cChatColor::Delimiter.c_str(),
+ cChatColor::Delimiter,
Server->GetMaxPlayers()
);
break;