Protocol changes for big blind / small blind. GUI Player is now stored in Game.

This commit is contained in:
lotodore
2007-05-20 22:49:07 +00:00
parent 63b278a88e
commit e4039695c0
10 changed files with 40 additions and 27 deletions
+2 -5
View File
@@ -392,12 +392,9 @@ ClientStateWaitSession::Process(ClientThread &client)
tmpPacket->ToNetPacketJoinGameAck()->GetData(joinGameAckData);
client.SetGameData(joinGameAckData.gameData);
// TODO: Hack
client.m_myPlayerNum = joinGameAckData.playerNumber;
// TODO: Type Human is fixed here.
boost::shared_ptr<PlayerData> playerData(
new PlayerData(joinGameAckData.playerId, joinGameAckData.playerNumber, PLAYER_TYPE_HUMAN));
new PlayerData(joinGameAckData.gameData.guiPlayerUniqueId, joinGameAckData.gameData.guiPlayerNum, PLAYER_TYPE_HUMAN));
playerData->SetName(context.GetPlayerName());
client.AddPlayerData(playerData);
@@ -515,7 +512,7 @@ ClientStateWaitHand::Process(ClientThread &client)
int myCards[2];
myCards[0] = (int)tmpData.yourCards[0];
myCards[1] = (int)tmpData.yourCards[1];
client.GetGame()->getPlayerArray()[client.m_myPlayerNum]->setMyCards(myCards);
client.GetGame()->getPlayerArray()[client.GetGame()->getGuiPlayerNum()]->setMyCards(myCards);
client.GetGui().dealHoleCards();
}
}