summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol125.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Protocol/Protocol125.cpp')
-rw-r--r--src/Protocol/Protocol125.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/Protocol/Protocol125.cpp b/src/Protocol/Protocol125.cpp
index a66c64309..0c481024e 100644
--- a/src/Protocol/Protocol125.cpp
+++ b/src/Protocol/Protocol125.cpp
@@ -262,7 +262,7 @@ void cProtocol125::SendChunkData(int a_ChunkX, int a_ChunkZ, cChunkDataSerialize
SendPreChunk(a_ChunkX, a_ChunkZ, true);
// Send the chunk data:
- AString Serialized = a_Serializer.Serialize(cChunkDataSerializer::RELEASE_1_2_5);
+ AString Serialized = a_Serializer.Serialize(cChunkDataSerializer::RELEASE_1_2_5, a_ChunkX, a_ChunkZ);
WriteByte(PACKET_MAP_CHUNK);
WriteInt (a_ChunkX);
WriteInt (a_ChunkZ);
@@ -700,7 +700,7 @@ void cProtocol125::SendEntityAnimation(const cEntity & a_Entity, char a_Animatio
-void cProtocol125::SendParticleEffect(const AString & a_ParticleName, float a_SrcX, float a_SrcY, float a_SrcZ, float a_OffsetX, float a_OffsetY, float a_OffsetZ, float a_ParticleData, int a_ParticleAmmount)
+void cProtocol125::SendParticleEffect(const AString & a_ParticleName, float a_SrcX, float a_SrcY, float a_SrcZ, float a_OffsetX, float a_OffsetY, float a_OffsetZ, float a_ParticleData, int a_ParticleAmount)
{
// Not supported by this protocol version
}
@@ -719,9 +719,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)
@@ -732,8 +738,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();
}