Fixing game list update. Joining players still broken.

This commit is contained in:
lotodore
2009-08-02 21:22:05 +00:00
parent 36d853bd69
commit 82ebd318d0
-9
View File
@@ -819,8 +819,6 @@ AbstractClientStateReceiving::HandlePacket(boost::shared_ptr<ClientThread> clien
NonZeroId_t **playerIds = netListNew->playerIds.list.array; NonZeroId_t **playerIds = netListNew->playerIds.list.array;
unsigned numPlayers = netListNew->playerIds.list.count; unsigned numPlayers = netListNew->playerIds.list.count;
// Request player info for players if needed. // Request player info for players if needed.
if (numPlayers && playerIds && *playerIds)
{
GameInfo tmpInfo; GameInfo tmpInfo;
for (unsigned i = 0; i < numPlayers; i++) for (unsigned i = 0; i < numPlayers; i++)
{ {
@@ -842,7 +840,6 @@ AbstractClientStateReceiving::HandlePacket(boost::shared_ptr<ClientThread> clien
client->AddGameInfo(gameId, tmpInfo); client->AddGameInfo(gameId, tmpInfo);
} }
}
else if (netGameList->gameListNotification.present == gameListNotification_PR_gameListUpdate) else if (netGameList->gameListNotification.present == gameListNotification_PR_gameListUpdate)
{ {
// An existing game was updated on the server. // An existing game was updated on the server.
@@ -1593,8 +1590,6 @@ ClientStateRunHand::InternalHandlePacket(boost::shared_ptr<ClientThread> client,
PlayerAllIn_t **allInPlayers = netAllInShow->playersAllIn.list.array; PlayerAllIn_t **allInPlayers = netAllInShow->playersAllIn.list.array;
unsigned numPlayers = netAllInShow->playersAllIn.list.count; unsigned numPlayers = netAllInShow->playersAllIn.list.count;
// Request player info for players if needed. // Request player info for players if needed.
if (numPlayers && allInPlayers && *allInPlayers)
{
for (unsigned i = 0; i < numPlayers; i++) for (unsigned i = 0; i < numPlayers; i++)
{ {
PlayerAllIn_t *p = allInPlayers[i]; PlayerAllIn_t *p = allInPlayers[i];
@@ -1609,7 +1604,6 @@ ClientStateRunHand::InternalHandlePacket(boost::shared_ptr<ClientThread> client,
tmpPlayer->setMyCards(tmpCards); tmpPlayer->setMyCards(tmpCards);
++i; ++i;
} }
}
client->GetGui().flipHolecardsAllIn(); client->GetGui().flipHolecardsAllIn();
} }
else if (tmpPacket->GetMsg()->present == PokerTHMessage_PR_endOfHandMessage) else if (tmpPacket->GetMsg()->present == PokerTHMessage_PR_endOfHandMessage)
@@ -1664,8 +1658,6 @@ ClientStateRunHand::InternalHandlePacket(boost::shared_ptr<ClientThread> client,
PlayerResult_t **playerResults = showCards->playerResults.list.array; PlayerResult_t **playerResults = showCards->playerResults.list.array;
unsigned numResults = showCards->playerResults.list.count; unsigned numResults = showCards->playerResults.list.count;
// Request player info for players if needed. // Request player info for players if needed.
if (numResults && playerResults && *playerResults)
{
for (unsigned i = 0; i < numResults; i++) for (unsigned i = 0; i < numResults; i++)
{ {
PlayerResult_t *r = playerResults[i]; PlayerResult_t *r = playerResults[i];
@@ -1690,7 +1682,6 @@ ClientStateRunHand::InternalHandlePacket(boost::shared_ptr<ClientThread> client,
if (r->moneyWon) if (r->moneyWon)
winnerList.push_back(r->playerId); winnerList.push_back(r->playerId);
} }
}
curGame->getCurrentHand()->getCurrentBeRo()->setHighestCardsValue(highestValueOfCards); curGame->getCurrentHand()->getCurrentBeRo()->setHighestCardsValue(highestValueOfCards);
curGame->getCurrentHand()->getBoard()->setPot(0); curGame->getCurrentHand()->getBoard()->setPot(0);