From 2c4fc82ae26ab95c4d503a3ccc282d81ff6b0c2f Mon Sep 17 00:00:00 2001 From: Garry Newman Date: Mon, 20 May 2019 14:52:31 +0100 Subject: [PATCH] Filled out FriendGameInfo --- Facepunch.Steamworks/Structs/Friend.cs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/Facepunch.Steamworks/Structs/Friend.cs b/Facepunch.Steamworks/Structs/Friend.cs index 67142b0..ea4a91b 100644 --- a/Facepunch.Steamworks/Structs/Friend.cs +++ b/Facepunch.Steamworks/Structs/Friend.cs @@ -116,10 +116,22 @@ namespace Steamworks { internal ulong GameID; // m_gameID class CGameID internal uint GameIP; // m_unGameIP uint32 - internal ushort GamePort; // m_usGamePort uint16 - internal ushort QueryPort; // m_usQueryPort uint16 internal ulong SteamIDLobby; // m_steamIDLobby class CSteamID + public int GamePort; + public int QueryPort; + + public System.Net.IPAddress IpAddress => Utility.Int32ToIp( GameIP ); + + public Lobby? Lobby + { + get + { + if ( SteamIDLobby == 0 ) return null; + return new Lobby( SteamIDLobby ); + } + } + internal static FriendGameInfo From( FriendGameInfo_t i ) { return new FriendGameInfo