Update dealer id before changing the player id.
This commit is contained in:
@@ -1154,11 +1154,11 @@ ServerGameStateHand::StartNewHand(boost::shared_ptr<ServerGame> server)
|
|||||||
netIdChanged->newPlayerId = session->GetPlayerData()->GetUniqueId();
|
netIdChanged->newPlayerId = session->GetPlayerData()->GetUniqueId();
|
||||||
server->SendToAllButOnePlayers(packet, session->GetId(), SessionData::Game);
|
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.
|
// Change the Id in the poker engine.
|
||||||
rejoinPlayer->setMyUniqueID(session->GetPlayerData()->GetUniqueId());
|
rejoinPlayer->setMyUniqueID(session->GetPlayerData()->GetUniqueId());
|
||||||
rejoinPlayer->setIsConnected(true);
|
rejoinPlayer->setIsConnected(true);
|
||||||
// Also update the dealer, if necessary.
|
|
||||||
curGame.replaceDealer(rejoinPlayer->getMyUniqueID(), session->GetPlayerData()->GetUniqueId());
|
|
||||||
|
|
||||||
// Send game start notification to rejoining client.
|
// Send game start notification to rejoining client.
|
||||||
packet.reset(new NetPacket(NetPacket::Alloc));
|
packet.reset(new NetPacket(NetPacket::Alloc));
|
||||||
|
|||||||
Reference in New Issue
Block a user