mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
filter running games; minor server code cleanup
This commit is contained in:
parent
9727a38956
commit
898623f1ba
24 changed files with 369 additions and 289 deletions
|
|
@ -160,6 +160,8 @@ void Server_Game::doStartGameIfReady()
|
|||
*/
|
||||
activePlayer = -1;
|
||||
nextTurn();
|
||||
|
||||
room->broadcastGameListUpdate(this);
|
||||
}
|
||||
|
||||
void Server_Game::startGameIfReady()
|
||||
|
|
@ -490,7 +492,7 @@ ServerInfo_Game *Server_Game::getInfo() const
|
|||
|
||||
if (players.isEmpty())
|
||||
// Game is closing
|
||||
return new ServerInfo_Game(room->getId(), getGameId(), QString(), false, 0, getMaxPlayers(), QList<GameTypeId *>(), 0, false, 0);
|
||||
return new ServerInfo_Game(room->getId(), getGameId(), QString(), false, 0, getMaxPlayers(), false, QList<GameTypeId *>(), 0, false, 0);
|
||||
else {
|
||||
// Game is open
|
||||
|
||||
|
|
@ -505,6 +507,7 @@ ServerInfo_Game *Server_Game::getInfo() const
|
|||
!getPassword().isEmpty(),
|
||||
getPlayerCount(),
|
||||
getMaxPlayers(),
|
||||
gameStarted,
|
||||
gameTypeList,
|
||||
new ServerInfo_User(getCreatorInfo(), false),
|
||||
onlyBuddies,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue