Fixing issue #135: Double game invite no longer leads to kick (server side fix).
This commit is contained in:
@@ -1448,8 +1448,10 @@ ServerLobbyThread::HandleNetPacketRejectGameInvitation(boost::shared_ptr<Session
|
|||||||
ServerGame &game = *pos->second;
|
ServerGame &game = *pos->second;
|
||||||
unsigned tmpPlayerId = session->GetPlayerData()->GetUniqueId();
|
unsigned tmpPlayerId = session->GetPlayerData()->GetUniqueId();
|
||||||
if (game.IsPlayerInvited(tmpPlayerId)) {
|
if (game.IsPlayerInvited(tmpPlayerId)) {
|
||||||
// If he rejects, he is no longer invited.
|
// If he actively rejects, he is no longer invited.
|
||||||
|
if (reject.myRejectReason == RejectGameInvReason_no) {
|
||||||
game.RemovePlayerInvitation(tmpPlayerId);
|
game.RemovePlayerInvitation(tmpPlayerId);
|
||||||
|
}
|
||||||
// Send reject notification.
|
// Send reject notification.
|
||||||
boost::shared_ptr<NetPacket> packet(new NetPacket(NetPacket::Alloc));
|
boost::shared_ptr<NetPacket> packet(new NetPacket(NetPacket::Alloc));
|
||||||
packet->GetMsg()->present = PokerTHMessage_PR_rejectInvNotifyMessage;
|
packet->GetMsg()->present = PokerTHMessage_PR_rejectInvNotifyMessage;
|
||||||
|
|||||||
Reference in New Issue
Block a user