From 3f22024281ed680bfb2fe3c5d721c20ba130a373 Mon Sep 17 00:00:00 2001 From: Jeff Date: Sat, 18 Jul 2015 01:33:15 -0400 Subject: [PATCH] Joining a full game joins you as spectator --- cockatrice/src/gameselector.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cockatrice/src/gameselector.cpp b/cockatrice/src/gameselector.cpp index 43471165..06b46c3e 100644 --- a/cockatrice/src/gameselector.cpp +++ b/cockatrice/src/gameselector.cpp @@ -157,12 +157,11 @@ void GameSelector::checkResponse(const Response &response) void GameSelector::actJoin() { - bool spectator = sender() == spectateButton; - QModelIndex ind = gameListView->currentIndex(); if (!ind.isValid()) return; const ServerInfo_Game &game = gameListModel->getGame(ind.data(Qt::UserRole).toInt()); + bool spectator = sender() == spectateButton || game.player_count() == game.max_players(); bool overrideRestrictions = !tabSupervisor->getAdminLocked(); QString password; if (game.with_password() && !(spectator && !game.spectators_need_password()) && !overrideRestrictions) {