Fixed bug when folding after raising.

This commit is contained in:
lotodore
2007-06-02 16:35:41 +00:00
parent 9512133490
commit b7b09aed0b
4 changed files with 26 additions and 10 deletions
+5 -1
View File
@@ -90,7 +90,11 @@ ClientThread::SendPlayerAction()
NetPacketPlayersAction::Data actionData;
actionData.gameState = static_cast<GameState>(GetGame()->getCurrentHand()->getActualRound());
actionData.playerAction = static_cast<PlayerAction>(GetGame()->getPlayerArray()[0]->getMyAction());
actionData.playerBet = GetGame()->getPlayerArray()[0]->getMyLastRelativeSet();
// Only send last bet if not fold/checked.
if (actionData.playerAction != PLAYER_ACTION_FOLD && actionData.playerAction != PLAYER_ACTION_CHECK)
actionData.playerBet = GetGame()->getPlayerArray()[0]->getMyLastRelativeSet();
else
actionData.playerBet = 0;
static_cast<NetPacketPlayersAction *>(action.get())->SetData(actionData);
// The sender is thread-safe, so just dump the packet.
GetSender().Send(GetContext().GetSocket(), action);