summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol17x.cpp
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-09-09 03:02:25 +0200
committerHowaner <franzi.moos@googlemail.com>2014-09-09 03:02:25 +0200
commitf94df06b6601f9dcecd383f5d093d225f41d1c65 (patch)
tree891720327a4971886e909e19f04bf1734addee8c /src/Protocol/Protocol17x.cpp
parentMerge branch 'master' into 1.8-Protocol (diff)
downloadcuberite-f94df06b6601f9dcecd383f5d093d225f41d1c65.tar
cuberite-f94df06b6601f9dcecd383f5d093d225f41d1c65.tar.gz
cuberite-f94df06b6601f9dcecd383f5d093d225f41d1c65.tar.bz2
cuberite-f94df06b6601f9dcecd383f5d093d225f41d1c65.tar.lz
cuberite-f94df06b6601f9dcecd383f5d093d225f41d1c65.tar.xz
cuberite-f94df06b6601f9dcecd383f5d093d225f41d1c65.tar.zst
cuberite-f94df06b6601f9dcecd383f5d093d225f41d1c65.zip
Diffstat (limited to '')
-rw-r--r--src/Protocol/Protocol17x.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/Protocol/Protocol17x.cpp b/src/Protocol/Protocol17x.cpp
index 162d4da30..b4f96bd88 100644
--- a/src/Protocol/Protocol17x.cpp
+++ b/src/Protocol/Protocol17x.cpp
@@ -867,14 +867,19 @@ void cProtocol172::SendParticleEffect(const AString & a_ParticleName, float a_Sr
-void cProtocol172::SendPlayerListItem(const cPlayer & a_Player, bool a_IsOnline)
+void cProtocol172::SendPlayerListItem(const cPlayer & a_Player, char a_Action)
{
ASSERT(m_State == 3); // In game mode?
-
+ if (a_Action == 1)
+ {
+ // Ignore gamemode update
+ return;
+ }
+
cPacketizer Pkt(*this, 0x38); // Playerlist Item packet
Pkt.WriteString(a_Player.GetName());
- Pkt.WriteBool(a_IsOnline);
- Pkt.WriteShort(a_IsOnline ? a_Player.GetClientHandle()->GetPing() : 0);
+ Pkt.WriteBool(a_Action != 4);
+ Pkt.WriteShort((a_Action == 4) ? 0 : a_Player.GetClientHandle()->GetPing());
}