Update dealer id before changing the player id.

This commit is contained in:
lotodore
2011-10-12 07:28:02 +00:00
parent ec7f5aec99
commit a732baa71a
+2 -2
View File
@@ -1154,11 +1154,11 @@ ServerGameStateHand::StartNewHand(boost::shared_ptr<ServerGame> server)
netIdChanged->newPlayerId = session->GetPlayerData()->GetUniqueId();
server->SendToAllButOnePlayers(packet, session->GetId(), SessionData::Game);
// Update the dealer, if necessary.
curGame.replaceDealer(rejoinPlayer->getMyUniqueID(), session->GetPlayerData()->GetUniqueId());
// Change the Id in the poker engine.
rejoinPlayer->setMyUniqueID(session->GetPlayerData()->GetUniqueId());
rejoinPlayer->setIsConnected(true);
// Also update the dealer, if necessary.
curGame.replaceDealer(rejoinPlayer->getMyUniqueID(), session->GetPlayerData()->GetUniqueId());
// Send game start notification to rejoining client.
packet.reset(new NetPacket(NetPacket::Alloc));