Call lobby invite callback when friend is invited.
							parent
							
								
									b4205535fb
								
							
						
					
					
						commit
						40b9b0ef3d
					
				| 
						 | 
				
			
			@ -1073,6 +1073,14 @@ void Callback(Common_Message *msg)
 | 
			
		|||
    if (msg->has_friend_messages()) {
 | 
			
		||||
        if (msg->friend_messages().type() == Friend_Messages::LOBBY_INVITE) {
 | 
			
		||||
            PRINT_DEBUG("Steam_Friends Got Lobby Invite\n");
 | 
			
		||||
            Friend *f = find_friend(msg->source_id());
 | 
			
		||||
            if (f) {
 | 
			
		||||
                LobbyInvite_t data;
 | 
			
		||||
                data.m_ulSteamIDUser = msg->source_id();
 | 
			
		||||
                data.m_ulSteamIDLobby = msg->friend_messages().lobby_id();
 | 
			
		||||
                data.m_ulGameID = f->appid();
 | 
			
		||||
                callbacks->addCBResult(data.k_iCallback, &data, sizeof(data));
 | 
			
		||||
 | 
			
		||||
                if (overlay->Ready())
 | 
			
		||||
                {
 | 
			
		||||
                    //TODO: the user should accept the invite first but we auto accept it because there's no gui yet
 | 
			
		||||
| 
						 | 
				
			
			@ -1087,6 +1095,7 @@ void Callback(Common_Message *msg)
 | 
			
		|||
                    callbacks->addCBResult(data.k_iCallback, &data, sizeof(data));
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (msg->friend_messages().type() == Friend_Messages::GAME_INVITE) {
 | 
			
		||||
            PRINT_DEBUG("Steam_Friends Got Game Invite\n");
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue