Took 4 minutes
This commit is contained in:
Lukas Brübach 2025-11-16 11:36:54 +01:00
parent be85b5bbe3
commit 7f536c5ff7
2 changed files with 6 additions and 6 deletions

View file

@ -306,7 +306,7 @@ void GameSelector::customContextMenu(const QPoint &point)
menu.exec(gameListView->mapToGlobal(point));
}
void GameSelector::joinGame(const bool isSpectator, const bool isJudge)
void GameSelector::joinGame(const bool asSpectator, const bool asJudge)
{
QModelIndex ind = gameListView->currentIndex();
if (!ind.isValid()) {
@ -318,7 +318,7 @@ void GameSelector::joinGame(const bool isSpectator, const bool isJudge)
return;
}
bool spectator = isSpectator || game.player_count() == game.max_players();
bool spectator = asSpectator || game.player_count() == game.max_players();
bool overrideRestrictions = !tabSupervisor->getAdminLocked();
QString password;
@ -335,7 +335,7 @@ void GameSelector::joinGame(const bool isSpectator, const bool isJudge)
cmd.set_password(password.toStdString());
cmd.set_spectator(spectator);
cmd.set_override_restrictions(overrideRestrictions);
cmd.set_join_as_judge(isJudge);
cmd.set_join_as_judge(asJudge);
TabRoom *r = tabSupervisor->getRoomTabs().value(game.room_id());
if (!r) {

View file

@ -159,12 +159,12 @@ private:
/**
* @brief Performs the join or spectate action for the currently selected game.
* @param isSpectator True to join as a spectator, false to join as a player.
* @param isJudge True to join as a judge, false to join as a player.
* @param asSpectator True to join as a spectator, false to join as a player.
* @param asJudge True to join as a judge, false to join as a player.
*
* Handles password prompts, overrides, and sending the join command to the server.
*/
void joinGame(bool isSpectator = false, bool isJudge = false);
void joinGame(bool asSpectator = false, bool asJudge = false);
public:
/**