private void Room_PlayerRemoved(Player obj) { _players[obj.Id].Destroy(); _players.Remove(obj.Id); _dialogs.RemoveClones(obj.Id); ServerLogger.LogServer(this, $" Player {obj.Id} removed"); }
private void Room_PlayerRemoved(Player obj) { if (m_players.TryRemove(obj.Id, out var player)) { player.Destroy(); _dialogs.RemoveClones(obj.Id); ServerLogger.LogServer(this, $" Player {obj.Id} removed"); } else { ServerLogger.LogServer(this, $" Couldn't remove player with id {obj.Id}"); } }