BinaryWriter writer;
// Inform the other players that the player's objects should be destroyed
if (mTemp.size > 0)
{
writer = BeginSend(Packet.ResponseDestroyObject);
writer.Write(ch.id);
writer.Write((ushort)mTemp.size);
for (int i = 0; i < mTemp.size; ++i) writer.Write(mTemp[i]);
EndSend(ch, null, true);
}
// If this player was the host, choose a new host
if (ch.host == null) SendSetHost(ch, (TcpPlayer)ch.players[0]);
// Inform everyone of this player leaving the channel
writer = BeginSend(Packet.ResponsePlayerLeft);
writer.Write(ch.id);
writer.Write(player.id);
EndSend(ch, null, true);