1
0

PACKET_DESTROY_ENTITY isn't sent for self when the player is kicked (FS #254)

git-svn-id: http://mc-server.googlecode.com/svn/trunk@985 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com 2012-10-20 10:36:50 +00:00
parent d2780443c6
commit c9224b09e9

View File

@ -271,6 +271,12 @@ void cProtocol132::SendCollectPickup(const cPickup & a_Pickup, const cPlayer & a
void cProtocol132::SendDestroyEntity(const cEntity & a_Entity) void cProtocol132::SendDestroyEntity(const cEntity & a_Entity)
{ {
if (a_Entity.GetUniqueID() == m_Client->GetPlayer()->GetUniqueID())
{
// Do not send "destroy self" to the client, the client would crash (FS #254)
return;
}
cCSLock Lock(m_CSPacket); cCSLock Lock(m_CSPacket);
WriteByte(PACKET_DESTROY_ENTITIES); WriteByte(PACKET_DESTROY_ENTITIES);
WriteByte(1); // entity count WriteByte(1); // entity count