Fixed a few nasty networking-related bugs.

This commit is contained in:
lotodore
2007-10-02 20:50:28 +00:00
parent 1127b89e6f
commit 4d68e58da2
4 changed files with 13 additions and 11 deletions
+1 -1
View File
@@ -76,7 +76,7 @@ ClientHand::getPlayerArray() const
PlayerList
ClientHand::getSeatsList() const
{
return activePlayerList;
return seatsList;
}
PlayerList
+1 -1
View File
@@ -161,7 +161,7 @@ void Game::initHand()
// }
//Spieler Action auf 0 setzen
for(it_c=activePlayerList->begin(); it_c!=activePlayerList->end(); it_c++) {
for(it_c=seatsList->begin(); it_c!=seatsList->end(); it_c++) {
(*it_c)->setMyAction(PLAYER_ACTION_NONE);
}
+9 -9
View File
@@ -1029,8 +1029,8 @@ void mainWindowImpl::callSettingsDialog() {
HandInterface *currentHand = mySession->getCurrentGame()->getCurrentHand();
PlayerListIterator it = currentHand->getSeatsList()->begin();
Game *currentGame = mySession->getCurrentGame();
PlayerListIterator it = currentGame->getSeatsList()->begin();
(*it)->setMyName(mySettingsDialog->lineEdit_HumanPlayerName->text().toUtf8().constData());
(*(++it))->setMyName(mySettingsDialog->lineEdit_Opponent1Name->text().toUtf8().constData());
(*(++it))->setMyName(mySettingsDialog->lineEdit_Opponent2Name->text().toUtf8().constData());
@@ -1066,8 +1066,8 @@ void mainWindowImpl::callSettingsDialog() {
HandInterface *currentHand = mySession->getCurrentGame()->getCurrentHand();
PlayerListIterator it = currentHand->getSeatsList()->begin();
Game *currentGame = mySession->getCurrentGame();
PlayerListIterator it = currentGame->getSeatsList()->begin();
(*it)->setMyAvatar(mySettingsDialog->pushButton_HumanPlayerAvatar->getMyLink().toUtf8().constData());
(*(++it))->setMyAvatar(mySettingsDialog->pushButton_Opponent1Avatar->getMyLink().toUtf8().constData());
(*(++it))->setMyAvatar(mySettingsDialog->pushButton_Opponent2Avatar->getMyLink().toUtf8().constData());
@@ -1176,10 +1176,10 @@ void mainWindowImpl::refreshSet() {
// else setLabelArray[i]->setText("Set: "+QString::number(mySession->getCurrentGame()->getCurrentHand()->getPlayerArray()[i]->getMySet(),10)+" $");
// }
HandInterface *currentHand = mySession->getCurrentGame()->getCurrentHand();
Game *currentGame = mySession->getCurrentGame();
PlayerListConstIterator it_c;
for (it_c=currentHand->getSeatsList()->begin(); it_c!=currentHand->getSeatsList()->end(); it_c++) {
for (it_c=currentGame->getSeatsList()->begin(); it_c!=currentGame->getSeatsList()->end(); it_c++) {
if( (*it_c)->getMySet() == 0 ) setLabelArray[ (*it_c)->getMyID() ]->setText("");
else setLabelArray[(*it_c)->getMyID()]->setText("Set: "+QString::number( (*it_c)->getMySet(),10)+" $");
}
@@ -1202,7 +1202,7 @@ void mainWindowImpl::refreshButton() {
// if (mySession->getCurrentGame()->getCurrentHand()->getPlayerArray()[k]->getMyActiveStatus() == 1) activePlayersCounter++;
// }
HandInterface *currentHand = mySession->getCurrentGame()->getCurrentHand();
Game *currentGame = mySession->getCurrentGame();
PlayerListConstIterator it_c;
@@ -1247,9 +1247,9 @@ void mainWindowImpl::refreshButton() {
for (it_c=currentHand->getSeatsList()->begin(); it_c!=currentHand->getSeatsList()->end(); it_c++) {
for (it_c=currentGame->getSeatsList()->begin(); it_c!=currentGame->getSeatsList()->end(); it_c++) {
if( (*it_c)->getMyActiveStatus() ) {
if( currentHand->getActivePlayerList()->size() > 2 ) {
if( currentGame->getActivePlayerList()->size() > 2 ) {
switch ( (*it_c)->getMyButton() ) {
case 1 : buttonLabelArray[(*it_c)->getMyID()]->setPixmap(dealerButton);
+2
View File
@@ -700,6 +700,8 @@ ClientStateWaitHand::InternalProcess(ClientThread &client, boost::shared_ptr<Net
client.GetGui().dealHoleCards();
client.GetGui().refreshGameLabels(GAME_STATE_PREFLOP);
client.GetGui().refreshPot();
client.GetGui().waitForGuiUpdateDone();
client.SetState(ClientStateRunHand::Instance());
retVal = MSG_NET_GAME_CLIENT_HAND_START;