From a732baa71ac66e1385076205c8c9eeea3bc1e623 Mon Sep 17 00:00:00 2001 From: lotodore Date: Wed, 12 Oct 2011 07:28:02 +0000 Subject: [PATCH] Update dealer id before changing the player id. --- src/net/common/servergamestate.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/net/common/servergamestate.cpp b/src/net/common/servergamestate.cpp index 837e95b6..5a0f3848 100644 --- a/src/net/common/servergamestate.cpp +++ b/src/net/common/servergamestate.cpp @@ -1154,11 +1154,11 @@ ServerGameStateHand::StartNewHand(boost::shared_ptr 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));