mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-05 13:03:55 -07:00
More player leaving fixes (#6148)
* Remove unnecessary parentheses. Took 16 minutes * Reorder player-left signals Took 11 seconds * Connect PlayerManager::playerRemoved signal to TabGame::processPlayerLeave. Took 21 seconds --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
parent
f4fbe90a72
commit
190ab211e3
3 changed files with 4 additions and 3 deletions
|
|
@ -85,7 +85,7 @@ void GameScene::rearrange()
|
|||
Player *p = playersIter.next()->getPlayer();
|
||||
if (p && !p->getConceded()) {
|
||||
playersPlaying.append(p);
|
||||
if (!firstPlayerFound && (p->getPlayerInfo()->getLocal())) {
|
||||
if (!firstPlayerFound && p->getPlayerInfo()->getLocal()) {
|
||||
firstPlayerIndex = playersPlaying.size() - 1;
|
||||
firstPlayerFound = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,9 +57,9 @@ void PlayerManager::removePlayer(int playerId)
|
|||
if (!player) {
|
||||
return;
|
||||
}
|
||||
players.remove(playerId);
|
||||
emit playerCountChanged();
|
||||
emit playerRemoved(player);
|
||||
emit playerCountChanged();
|
||||
players.remove(playerId);
|
||||
}
|
||||
|
||||
Player *PlayerManager::getPlayer(int playerId) const
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue