On rejoin, send full seats list, not only active players, so that the seatStatus can be updated properly.

This commit is contained in:
lotodore
2011-12-27 09:05:50 +00:00
parent de7a06da44
commit 4c15195f07
2 changed files with 8 additions and 8 deletions
+7 -7
View File
@@ -1371,15 +1371,15 @@ ServerGameStateHand::PerformRejoin(boost::shared_ptr<ServerGame> server, boost::
netStartModeRejoin->handNum = curGame.getCurrentHandID();
PlayerListIterator player_i = curGame.getSeatsList()->begin();
PlayerListIterator player_end = curGame.getSeatsList()->end();
while (player_i != player_end) {
int player_count = 0;
while (player_i != player_end && player_count < server->GetStartData().numberOfPlayers) {
boost::shared_ptr<PlayerInterface> tmpPlayer = *player_i;
if (tmpPlayer->getMyActiveStatus()) {
RejoinPlayerData_t *playerSlot = (RejoinPlayerData_t *)calloc(1, sizeof(RejoinPlayerData_t));
playerSlot->playerId = tmpPlayer->getMyUniqueID();
playerSlot->playerMoney = tmpPlayer->getMyCash();
ASN_SEQUENCE_ADD(&netStartModeRejoin->rejoinPlayerData.list, playerSlot);
}
RejoinPlayerData_t *playerSlot = (RejoinPlayerData_t *)calloc(1, sizeof(RejoinPlayerData_t));
playerSlot->playerId = tmpPlayer->getMyUniqueID();
playerSlot->playerMoney = tmpPlayer->getMyCash();
ASN_SEQUENCE_ADD(&netStartModeRejoin->rejoinPlayerData.list, playerSlot);
++player_i;
++player_count;
}
server->GetLobbyThread().GetSender().Send(session, packet);