mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-21 09:05:10 -07:00
[Server] Adapt tournament engine to the shared settings message
- read games per match from Command_CreateGame.tournament_settings after the proto rework replaced the standalone games_per_match field - use qWarning to match the surrounding file
This commit is contained in:
parent
18fac5c5b9
commit
99a409de09
2 changed files with 3 additions and 2 deletions
|
|
@ -977,7 +977,7 @@ void Server_Game::startTournament()
|
|||
|
||||
// A tournament with fewer than two players can't produce a valid bracket.
|
||||
if (tournament->getPlayerCount() < 2) {
|
||||
qCWarning() << "Cannot start tournament with fewer than 2 players";
|
||||
qWarning() << "Cannot start tournament with fewer than 2 players";
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -918,7 +918,8 @@ Server_ProtocolHandler::cmdCreateGame(const Command_CreateGame &cmd, Server_Room
|
|||
|
||||
bool shareDecklistsOnLoad = cmd.has_share_decklists_on_load() ? cmd.share_decklists_on_load() : false;
|
||||
bool isTournament = cmd.has_is_tournament() ? cmd.is_tournament() : false;
|
||||
int gamesPerMatch = cmd.has_games_per_match() ? static_cast<int>(cmd.games_per_match()) : 1;
|
||||
int gamesPerMatch =
|
||||
cmd.has_tournament_settings() ? static_cast<int>(cmd.tournament_settings().games_per_match()) : 1;
|
||||
|
||||
const int gameId = databaseInterface->getNextGameId();
|
||||
if (gameId == -1) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue