Trying to fix problem with client active status on rejoin.

This commit is contained in:
lotodore
2011-11-05 20:53:59 +00:00
parent 6fbb5c9841
commit 26f01f0946
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -1694,6 +1694,8 @@ ClientStateWaitHand::InternalHandlePacket(boost::shared_ptr<ClientThread> client
if (!tmpPlayer)
throw ClientException(__FILE__, __LINE__, ERR_NET_UNKNOWN_PLAYER_ID, 0);
tmpPlayer->setMyUniqueID(idChanged->newPlayerId);
// This player is now active again.
tmpPlayer->setMyActiveStatus(true);
// Also update the dealer, if necessary.
curGame->replaceDealer(idChanged->oldPlayerId, idChanged->newPlayerId);
}
+1 -1
View File
@@ -1162,7 +1162,7 @@ ClientThread::RemoveDisconnectedPlayers()
if (tmpPlayer->getMyActiveStatus()) {
// If a player is not in the player data list, it was disconnected.
if (!GetPlayerDataByUniqueId(tmpPlayer->getMyUniqueID()).get()) {
tmpPlayer->setMyCash(0);
//tmpPlayer->setMyCash(0);
tmpPlayer->setMyActiveStatus(false);
}
}