[QUOTE=;552017]
Thanks for the fast reply. I’m at work right now. I can take a screenshot later. No hurry… I know supporting things can be a lot of work. Friend.PresenceInfo discovering if they are joinable would be a great!
Edit: It’s strange it only crashes in the editor. I imagine detecting if they are joinable first will fix the problem.
It was only the “GetFriend” function that was missing the Presence information. GetStoredFriendsList and GetFriendsList both return the correct presence and you should be able to check “bIsJoinable” and “bIsPlayingSameGame”.
Also the steam function FindFriendSession already checks to see if they are actually in game or not. I would like that screenshot when possible, I can’t find a problem in the code itself so far.
Edit Unless it has to do with this:
else
{
// Search for the session via host ip
TSharedRef<FInternetAddr> IpAddr = ISocketSubsystem::Get()->CreateInternetAddr(FriendGameInfo.m_unGameIP, FriendGameInfo.m_usGamePort);
CurrentSessionSearch->QuerySettings.Set(FName(SEARCH_STEAM_HOSTIP), IpAddr->ToString(true), EOnlineComparisonOp::Equals);
FOnlineAsyncTaskSteamFindServer* NewTask = new FOnlineAsyncTaskSteamFindServer(SteamSubsystem, SearchSettings, LocalUserNum, OnFindFriendSessionCompleteDelegates[LocalUserNum]);
SteamSubsystem->QueueAsyncTask(NewTask);
}
If the player isn’t in a session then it tries to find a server by the players session IP instead, i’ll see if steam ever passes in a NULL for an ip.
Edit 2
Welp, no clue anymore, there is some funky **** going on in the steam subsystem
TSharedRef<FInternetAddr> FSocketSubsystemSteam::CreateInternetAddr(uint32 Address, uint32 Port)
{
FInternetAddrSteam* SteamAddr = new FInternetAddrSteam();
return MakeShareable(SteamAddr);
}
When making the search for the ip based game it uses that function, which doesn’t end up using the passed in address and port at all… The default socketsubsystem uses them but it is calling the SocketSubsystemSteams implementation instead so the port and ip are just 0.
Long story short, I think the steam subsystem has some real problems in it and you should just check if they are playing a game and are joinable before getting their session information. I will upload a new version that has the GetFriendInfo having the full presence information after I run a debug test to make sure it actually calls that function.