Set "stayOnTableStatus" in engine.
This commit is contained in:
@@ -1735,7 +1735,7 @@ ClientStateWaitHand::InternalHandlePacket(boost::shared_ptr<ClientThread> client
|
|||||||
throw ClientException(__FILE__, __LINE__, ERR_NET_UNKNOWN_PLAYER_ID, 0);
|
throw ClientException(__FILE__, __LINE__, ERR_NET_UNKNOWN_PLAYER_ID, 0);
|
||||||
tmpPlayer->setMyUniqueID(idChanged->newPlayerId);
|
tmpPlayer->setMyUniqueID(idChanged->newPlayerId);
|
||||||
// This player is now active again.
|
// This player is now active again.
|
||||||
tmpPlayer->setMyActiveStatus(true);
|
tmpPlayer->setMyStayOnTableStatus(true);
|
||||||
// Also update the dealer, if necessary.
|
// Also update the dealer, if necessary.
|
||||||
curGame->replaceDealer(idChanged->oldPlayerId, idChanged->newPlayerId);
|
curGame->replaceDealer(idChanged->oldPlayerId, idChanged->newPlayerId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1074,6 +1074,12 @@ ClientThread::RemovePlayerData(unsigned playerId, int removeReason)
|
|||||||
|
|
||||||
if (tmpData.get()) {
|
if (tmpData.get()) {
|
||||||
// Remove player from gui.
|
// Remove player from gui.
|
||||||
|
if (GetGame()) {
|
||||||
|
boost::shared_ptr<PlayerInterface> tmpPlayer(GetGame()->getPlayerByUniqueId(tmpData->GetUniqueId()));
|
||||||
|
if (tmpPlayer) {
|
||||||
|
tmpPlayer->setMyStayOnTableStatus(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
GetCallback().SignalNetClientPlayerLeft(tmpData->GetUniqueId(), tmpData->GetName(), removeReason);
|
GetCallback().SignalNetClientPlayerLeft(tmpData->GetUniqueId(), tmpData->GetName(), removeReason);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user