Client engine should now be completely thread safe. const int& -> int. Player CardsValue is now returned as copy, not the array itself.

This commit is contained in:
lotodore
2007-06-11 17:48:22 +00:00
parent dfffa16565
commit 07dc39d107
30 changed files with 1128 additions and 225 deletions
+3 -1
View File
@@ -618,12 +618,14 @@ ServerRecvStateStartRound::Process(ServerRecvThread &server)
tmpPlayerResult.playerId = (*i)->getMyUniqueID();
int tmpCards[2];
int bestHandPos[5];
(*i)->getMyCards(tmpCards);
tmpPlayerResult.cards[0] = static_cast<u_int16_t>(tmpCards[0]);
tmpPlayerResult.cards[1] = static_cast<u_int16_t>(tmpCards[1]);
(*i)->getMyBestHandPosition(bestHandPos);
for (int num = 0; num < 5; num++)
tmpPlayerResult.bestHandPos[num] = (*i)->getMyBestHandPosition()[num];
tmpPlayerResult.bestHandPos[num] = bestHandPos[num];
tmpPlayerResult.valueOfCards = (*i)->getMyCardsValueInt();
tmpPlayerResult.moneyWon = 0; // TODO