Fixed kicking someone from the game in the lobby. Vote kick still seems to be broken, could not find the bug yet.
This commit is contained in:
@@ -756,7 +756,29 @@ AbstractClientStateReceiving::HandlePacket(boost::shared_ptr<ClientThread> clien
|
|||||||
client->ResubscribeLobbyMsg();
|
client->ResubscribeLobbyMsg();
|
||||||
// Show Lobby.
|
// Show Lobby.
|
||||||
client->GetCallback().SignalNetClientWaitDialog();
|
client->GetCallback().SignalNetClientWaitDialog();
|
||||||
client->GetCallback().SignalNetClientRemovedFromGame(netRemoved->removedFromGameReason);
|
int removeReason;
|
||||||
|
switch (netRemoved->removedFromGameReason)
|
||||||
|
{
|
||||||
|
case removedFromGameReason_kickedFromGame :
|
||||||
|
removeReason = NTF_NET_REMOVED_KICKED;
|
||||||
|
break;
|
||||||
|
case removedFromGameReason_gameIsFull :
|
||||||
|
removeReason = NTF_NET_REMOVED_GAME_FULL;
|
||||||
|
break;
|
||||||
|
case removedFromGameReason_gameIsRunning :
|
||||||
|
removeReason = NTF_NET_REMOVED_ALREADY_RUNNING;
|
||||||
|
break;
|
||||||
|
case removedFromGameReason_gameTimeout :
|
||||||
|
removeReason = NTF_NET_REMOVED_TIMEOUT;
|
||||||
|
break;
|
||||||
|
case removedFromGameReason_removedStartFailed :
|
||||||
|
removeReason = NTF_NET_REMOVED_START_FAILED;
|
||||||
|
break;
|
||||||
|
default :
|
||||||
|
removeReason = NTF_NET_REMOVED_ON_REQUEST;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
client->GetCallback().SignalNetClientRemovedFromGame(removeReason);
|
||||||
client->SetState(ClientStateWaitJoin::Instance());
|
client->SetState(ClientStateWaitJoin::Instance());
|
||||||
}
|
}
|
||||||
else if (netGamePlayer->gamePlayerNotification.present == gamePlayerNotification_PR_gamePlayerLeft)
|
else if (netGamePlayer->gamePlayerNotification.present == gamePlayerNotification_PR_gamePlayerLeft)
|
||||||
|
|||||||
@@ -195,6 +195,7 @@ ServerLobbyThread::ReAddSession(SessionWrapper session, int reason)
|
|||||||
boost::shared_ptr<NetPacket> packet(new NetPacket(NetPacket::Alloc));
|
boost::shared_ptr<NetPacket> packet(new NetPacket(NetPacket::Alloc));
|
||||||
packet->GetMsg()->present = PokerTHMessage_PR_gamePlayerMessage;
|
packet->GetMsg()->present = PokerTHMessage_PR_gamePlayerMessage;
|
||||||
GamePlayerMessage_t *netPlayerMsg = &packet->GetMsg()->choice.gamePlayerMessage;
|
GamePlayerMessage_t *netPlayerMsg = &packet->GetMsg()->choice.gamePlayerMessage;
|
||||||
|
netPlayerMsg->gameId = session.sessionData->GetGameId();
|
||||||
netPlayerMsg->gamePlayerNotification.present = gamePlayerNotification_PR_removedFromGame;
|
netPlayerMsg->gamePlayerNotification.present = gamePlayerNotification_PR_removedFromGame;
|
||||||
RemovedFromGame_t *removed = &netPlayerMsg->gamePlayerNotification.choice.removedFromGame;
|
RemovedFromGame_t *removed = &netPlayerMsg->gamePlayerNotification.choice.removedFromGame;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user