mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2025-12-21 23:00:24 -08:00
Merge branch 'master' of ssh://cockatrice.de/home/cockgit/cockatrice
Conflicts: common/server_game.cpp
This commit is contained in:
@@ -958,18 +958,7 @@ ResponseCode Server_ProtocolHandler::cmdNextTurn(Command_NextTurn * /*cmd*/, Com
|
||||
if (!game->getGameStarted())
|
||||
return RespGameNotStarted;
|
||||
|
||||
const QMap<int, Server_Player *> &players = game->getPlayers();
|
||||
const QList<int> keys = players.keys();
|
||||
|
||||
int activePlayer = game->getActivePlayer();
|
||||
int listPos = keys.indexOf(activePlayer);
|
||||
do {
|
||||
++listPos;
|
||||
if (listPos == keys.size())
|
||||
listPos = 0;
|
||||
} while (players.value(keys[listPos])->getSpectator());
|
||||
|
||||
game->setActivePlayer(keys[listPos]);
|
||||
game->nextTurn();
|
||||
return RespOk;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user