Changed network code for new player lists.

This commit is contained in:
lotodore
2007-09-27 14:17:07 +00:00
parent c469eb5848
commit 78bf4820af
11 changed files with 160 additions and 220 deletions
+3 -2
View File
@@ -134,11 +134,12 @@ ClientThread::SendPlayerAction()
// Create a network packet containing the current player action.
boost::shared_ptr<NetPacket> action(new NetPacketPlayersAction);
NetPacketPlayersAction::Data actionData;
boost::shared_ptr<PlayerInterface> myPlayer = GetGame()->getSeatsList()->front();
actionData.gameState = static_cast<GameState>(GetGame()->getCurrentHand()->getActualRound());
actionData.playerAction = static_cast<PlayerAction>(GetGame()->getPlayerArray()[0]->getMyAction());
actionData.playerAction = static_cast<PlayerAction>(myPlayer->getMyAction());
// Only send last bet if not fold/checked.
if (actionData.playerAction != PLAYER_ACTION_FOLD && actionData.playerAction != PLAYER_ACTION_CHECK)
actionData.playerBet = GetGame()->getPlayerArray()[0]->getMyLastRelativeSet();
actionData.playerBet = myPlayer->getMyLastRelativeSet();
else
actionData.playerBet = 0;
try