Rejoin now works, but yet only as spectator.
This commit is contained in:
@@ -1133,9 +1133,8 @@ ServerGameStateHand::GetDealCardsDelaySec(ServerGame &server)
|
||||
void
|
||||
ServerGameStateHand::StartNewHand(boost::shared_ptr<ServerGame> server)
|
||||
{
|
||||
// Initialize hand.
|
||||
Game &curGame = server->GetGame();
|
||||
curGame.initHand();
|
||||
|
||||
// Initialize rejoining players.
|
||||
{
|
||||
PlayerIdList rejoinIdList(server->GetAndResetRejoinPlayers());
|
||||
@@ -1158,6 +1157,7 @@ ServerGameStateHand::StartNewHand(boost::shared_ptr<ServerGame> server)
|
||||
GameStartModeRejoin_t *netStartModeRejoin = &netGameStart->gameStartMode.choice.gameStartModeRejoin;
|
||||
|
||||
// Send player data to client.
|
||||
netStartModeRejoin->handNum = curGame.getCurrentHandID();
|
||||
PlayerListIterator player_i = curGame.getSeatsList()->begin();
|
||||
PlayerListIterator player_end = curGame.getSeatsList()->end();
|
||||
while (player_i != player_end) {
|
||||
@@ -1178,6 +1178,9 @@ ServerGameStateHand::StartNewHand(boost::shared_ptr<ServerGame> server)
|
||||
}
|
||||
}
|
||||
|
||||
// Initialize hand.
|
||||
curGame.initHand();
|
||||
|
||||
// HACK: Skip GUI notification run
|
||||
curGame.getCurrentHand()->getFlop()->skipFirstRunGui();
|
||||
curGame.getCurrentHand()->getTurn()->skipFirstRunGui();
|
||||
|
||||
Reference in New Issue
Block a user