diff options
author | Howaner <franzi.moos@googlemail.com> | 2014-09-09 03:02:25 +0200 |
---|---|---|
committer | Howaner <franzi.moos@googlemail.com> | 2014-09-09 03:02:25 +0200 |
commit | f94df06b6601f9dcecd383f5d093d225f41d1c65 (patch) | |
tree | 891720327a4971886e909e19f04bf1734addee8c /src/Protocol/Protocol125.cpp | |
parent | Merge branch 'master' into 1.8-Protocol (diff) | |
download | cuberite-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 'src/Protocol/Protocol125.cpp')
-rw-r--r-- | src/Protocol/Protocol125.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/Protocol/Protocol125.cpp b/src/Protocol/Protocol125.cpp index 77939d933..8c4534ff7 100644 --- a/src/Protocol/Protocol125.cpp +++ b/src/Protocol/Protocol125.cpp @@ -720,9 +720,15 @@ void cProtocol125::SendPaintingSpawn(const cPainting & a_Painting) -void cProtocol125::SendPlayerListItem(const cPlayer & a_Player, bool a_IsOnline) +void cProtocol125::SendPlayerListItem(const cPlayer & a_Player, char a_Action) { cCSLock Lock(m_CSPacket); + if (a_Action == 1) + { + // Ignore gamemode update + return; + } + AString PlayerName(a_Player.GetColor()); PlayerName.append(a_Player.GetName()); if (PlayerName.length() > 14) @@ -733,8 +739,8 @@ void cProtocol125::SendPlayerListItem(const cPlayer & a_Player, bool a_IsOnline) WriteByte ((unsigned char)PACKET_PLAYER_LIST_ITEM); WriteString(PlayerName); - WriteBool (a_IsOnline); - WriteShort (a_IsOnline ? a_Player.GetClientHandle()->GetPing() : 0); + WriteBool (a_Action != 4); + WriteShort ((a_Action == 4) ? 0 : a_Player.GetClientHandle()->GetPing()); Flush(); } |