Fixed macro redefinition. Set money won in server.
This commit is contained in:
@@ -738,7 +738,6 @@ PlayerResult Record
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
| Player Money |
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
(Money Won is currently set to 0.)
|
||||
|
||||
|
||||
Server Notification: End Of Hand Hide Cards
|
||||
@@ -754,7 +753,6 @@ Server Notification: End Of Hand Hide Cards
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
| Player Money |
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
(Money Won is currently set to 0.)
|
||||
|
||||
|
||||
Server Notification: End Of Game
|
||||
|
||||
@@ -309,12 +309,14 @@ ClientPlayer::getMyRoundStartCash() const
|
||||
void
|
||||
ClientPlayer::setLastMoneyWon ( int theValue )
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
||||
lastMoneyWon = theValue;
|
||||
}
|
||||
|
||||
int
|
||||
ClientPlayer::getLastMoneyWon() const
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
||||
return lastMoneyWon;
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
#define SEND_TIMEOUT_MSEC 2000
|
||||
#define SEND_ERROR_TIMEOUT_MSEC 2000
|
||||
|
||||
SenderThread::SenderThread(SenderCallback &cb)
|
||||
: m_tmpOutBufSize(0), m_callback(cb)
|
||||
@@ -117,7 +117,7 @@ SenderThread::Main()
|
||||
|
||||
while (!ShouldTerminate())
|
||||
{
|
||||
if (sendTimer.is_running() && sendTimer.elapsed().total_milliseconds() > SEND_TIMEOUT_MSEC)
|
||||
if (sendTimer.is_running() && sendTimer.elapsed().total_milliseconds() > SEND_ERROR_TIMEOUT_MSEC)
|
||||
{
|
||||
RemoveCurSendData();
|
||||
sendTimer.reset();
|
||||
|
||||
@@ -734,7 +734,7 @@ ServerGameStateStartRound::Process(ServerGameThread &server)
|
||||
boost::shared_ptr<NetPacket> endHand(new NetPacketEndOfHandHideCards);
|
||||
NetPacketEndOfHandHideCards::Data endHandData;
|
||||
endHandData.playerId = player->getMyUniqueID();
|
||||
endHandData.moneyWon = 0; // TODO
|
||||
endHandData.moneyWon = player->getLastMoneyWon();
|
||||
endHandData.playerMoney = player->getMyCash();
|
||||
static_cast<NetPacketEndOfHandHideCards *>(endHand.get())->SetData(endHandData);
|
||||
|
||||
@@ -765,7 +765,7 @@ ServerGameStateStartRound::Process(ServerGameThread &server)
|
||||
tmpPlayerResult.bestHandPos[num] = bestHandPos[num];
|
||||
|
||||
tmpPlayerResult.valueOfCards = (*i)->getMyCardsValueInt();
|
||||
tmpPlayerResult.moneyWon = 0; // TODO
|
||||
tmpPlayerResult.moneyWon = (*i)->getLastMoneyWon();
|
||||
tmpPlayerResult.playerMoney = (*i)->getMyCash();
|
||||
|
||||
endHandData.playerResults.push_back(tmpPlayerResult);
|
||||
|
||||
Reference in New Issue
Block a user