Fixed a few nasty networking-related bugs.
This commit is contained in:
@@ -76,7 +76,7 @@ ClientHand::getPlayerArray() const
|
|||||||
PlayerList
|
PlayerList
|
||||||
ClientHand::getSeatsList() const
|
ClientHand::getSeatsList() const
|
||||||
{
|
{
|
||||||
return activePlayerList;
|
return seatsList;
|
||||||
}
|
}
|
||||||
|
|
||||||
PlayerList
|
PlayerList
|
||||||
|
|||||||
+1
-1
@@ -161,7 +161,7 @@ void Game::initHand()
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
//Spieler Action auf 0 setzen
|
//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);
|
(*it_c)->setMyAction(PLAYER_ACTION_NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1029,8 +1029,8 @@ void mainWindowImpl::callSettingsDialog() {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
HandInterface *currentHand = mySession->getCurrentGame()->getCurrentHand();
|
Game *currentGame = mySession->getCurrentGame();
|
||||||
PlayerListIterator it = currentHand->getSeatsList()->begin();
|
PlayerListIterator it = currentGame->getSeatsList()->begin();
|
||||||
(*it)->setMyName(mySettingsDialog->lineEdit_HumanPlayerName->text().toUtf8().constData());
|
(*it)->setMyName(mySettingsDialog->lineEdit_HumanPlayerName->text().toUtf8().constData());
|
||||||
(*(++it))->setMyName(mySettingsDialog->lineEdit_Opponent1Name->text().toUtf8().constData());
|
(*(++it))->setMyName(mySettingsDialog->lineEdit_Opponent1Name->text().toUtf8().constData());
|
||||||
(*(++it))->setMyName(mySettingsDialog->lineEdit_Opponent2Name->text().toUtf8().constData());
|
(*(++it))->setMyName(mySettingsDialog->lineEdit_Opponent2Name->text().toUtf8().constData());
|
||||||
@@ -1066,8 +1066,8 @@ void mainWindowImpl::callSettingsDialog() {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
HandInterface *currentHand = mySession->getCurrentGame()->getCurrentHand();
|
Game *currentGame = mySession->getCurrentGame();
|
||||||
PlayerListIterator it = currentHand->getSeatsList()->begin();
|
PlayerListIterator it = currentGame->getSeatsList()->begin();
|
||||||
(*it)->setMyAvatar(mySettingsDialog->pushButton_HumanPlayerAvatar->getMyLink().toUtf8().constData());
|
(*it)->setMyAvatar(mySettingsDialog->pushButton_HumanPlayerAvatar->getMyLink().toUtf8().constData());
|
||||||
(*(++it))->setMyAvatar(mySettingsDialog->pushButton_Opponent1Avatar->getMyLink().toUtf8().constData());
|
(*(++it))->setMyAvatar(mySettingsDialog->pushButton_Opponent1Avatar->getMyLink().toUtf8().constData());
|
||||||
(*(++it))->setMyAvatar(mySettingsDialog->pushButton_Opponent2Avatar->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)+" $");
|
// 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;
|
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("");
|
if( (*it_c)->getMySet() == 0 ) setLabelArray[ (*it_c)->getMyID() ]->setText("");
|
||||||
else setLabelArray[(*it_c)->getMyID()]->setText("Set: "+QString::number( (*it_c)->getMySet(),10)+" $");
|
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++;
|
// if (mySession->getCurrentGame()->getCurrentHand()->getPlayerArray()[k]->getMyActiveStatus() == 1) activePlayersCounter++;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
HandInterface *currentHand = mySession->getCurrentGame()->getCurrentHand();
|
Game *currentGame = mySession->getCurrentGame();
|
||||||
|
|
||||||
PlayerListConstIterator it_c;
|
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( (*it_c)->getMyActiveStatus() ) {
|
||||||
if( currentHand->getActivePlayerList()->size() > 2 ) {
|
if( currentGame->getActivePlayerList()->size() > 2 ) {
|
||||||
switch ( (*it_c)->getMyButton() ) {
|
switch ( (*it_c)->getMyButton() ) {
|
||||||
|
|
||||||
case 1 : buttonLabelArray[(*it_c)->getMyID()]->setPixmap(dealerButton);
|
case 1 : buttonLabelArray[(*it_c)->getMyID()]->setPixmap(dealerButton);
|
||||||
|
|||||||
@@ -700,6 +700,8 @@ ClientStateWaitHand::InternalProcess(ClientThread &client, boost::shared_ptr<Net
|
|||||||
client.GetGui().dealHoleCards();
|
client.GetGui().dealHoleCards();
|
||||||
client.GetGui().refreshGameLabels(GAME_STATE_PREFLOP);
|
client.GetGui().refreshGameLabels(GAME_STATE_PREFLOP);
|
||||||
client.GetGui().refreshPot();
|
client.GetGui().refreshPot();
|
||||||
|
client.GetGui().waitForGuiUpdateDone();
|
||||||
|
|
||||||
client.SetState(ClientStateRunHand::Instance());
|
client.SetState(ClientStateRunHand::Instance());
|
||||||
|
|
||||||
retVal = MSG_NET_GAME_CLIENT_HAND_START;
|
retVal = MSG_NET_GAME_CLIENT_HAND_START;
|
||||||
|
|||||||
Reference in New Issue
Block a user