Fixing interpretation of seat state in client.

This commit is contained in:
lotodore
2011-12-22 21:57:18 +00:00
parent f8c1cdf56e
commit fc7be88602
+2 -2
View File
@@ -1649,9 +1649,9 @@ ClientStateWaitHand::InternalHandlePacket(boost::shared_ptr<ClientThread> client
unsigned numPlayers = netHandStart->seatStates.list.count;
// Request player info for players if needed.
if (numPlayers && seatStates && *seatStates) {
for (int i = 0; i < numPlayers; i++) {
for (int i = 0; i < (int)numPlayers; i++) {
NetPlayerState_t *seatState = seatStates[i];
boost::shared_ptr<PlayerInterface> tmpPlayer = client->GetGame()->getPlayerByNumber((i + client->GetOrigGuiPlayerNum()) % client->GetStartData().numberOfPlayers);
boost::shared_ptr<PlayerInterface> tmpPlayer = client->GetGame()->getPlayerByNumber((i + client->GetOrigGuiPlayerNum()) % numPlayers);
if (!tmpPlayer)
throw ClientException(__FILE__, __LINE__, ERR_NET_UNKNOWN_PLAYER_ID, 0);
switch (*seatState)