public void OnClientFinish(Client client) { Client outClient; while (!Clients.TryRemove(client.PlayerId, out outClient)) { Thread.Sleep(1); } Send(new NetworkPacketRemovePlayer(client.PlayerId), client); MushroomAI.OnClientFinish(client); PigAI.OnClientFinish(client); TrapManager.OnClientFinish(this, client); }