From b90fa705aa349e87816b5cd30d533ae7b8ebfc29 Mon Sep 17 00:00:00 2001 From: lotodore Date: Fri, 23 Dec 2011 19:32:56 +0000 Subject: [PATCH] Set "stayOnTableStatus" in engine. --- src/net/common/clientstate.cpp | 2 +- src/net/common/clientthread.cpp | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/net/common/clientstate.cpp b/src/net/common/clientstate.cpp index b9a9ef4e..d02880f6 100644 --- a/src/net/common/clientstate.cpp +++ b/src/net/common/clientstate.cpp @@ -1735,7 +1735,7 @@ ClientStateWaitHand::InternalHandlePacket(boost::shared_ptr client throw ClientException(__FILE__, __LINE__, ERR_NET_UNKNOWN_PLAYER_ID, 0); tmpPlayer->setMyUniqueID(idChanged->newPlayerId); // This player is now active again. - tmpPlayer->setMyActiveStatus(true); + tmpPlayer->setMyStayOnTableStatus(true); // Also update the dealer, if necessary. curGame->replaceDealer(idChanged->oldPlayerId, idChanged->newPlayerId); } diff --git a/src/net/common/clientthread.cpp b/src/net/common/clientthread.cpp index f44445f2..fde75674 100644 --- a/src/net/common/clientthread.cpp +++ b/src/net/common/clientthread.cpp @@ -1074,6 +1074,12 @@ ClientThread::RemovePlayerData(unsigned playerId, int removeReason) if (tmpData.get()) { // Remove player from gui. + if (GetGame()) { + boost::shared_ptr tmpPlayer(GetGame()->getPlayerByUniqueId(tmpData->GetUniqueId())); + if (tmpPlayer) { + tmpPlayer->setMyStayOnTableStatus(false); + } + } GetCallback().SignalNetClientPlayerLeft(tmpData->GetUniqueId(), tmpData->GetName(), removeReason); } }