mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-24 13:45:37 +03:00
Merge pull request #132 from dblstallion/master
Added ability to register to OnLobbyJoinRequested callback
This commit is contained in:
commit
aa3a6d4d24
@ -37,6 +37,9 @@ public Lobby( Client c )
|
||||
{
|
||||
client = c;
|
||||
|
||||
// For backwards compatibility
|
||||
OnLobbyJoinRequested = Join;
|
||||
|
||||
client.RegisterCallback<SteamNative.LobbyDataUpdate_t>( OnLobbyDataUpdatedAPI );
|
||||
client.RegisterCallback<SteamNative.LobbyChatMsg_t>( OnLobbyChatMessageRecievedAPI );
|
||||
client.RegisterCallback<SteamNative.LobbyChatUpdate_t>( OnLobbyStateUpdatedAPI );
|
||||
@ -493,12 +496,17 @@ public void OpenFriendInviteOverlay()
|
||||
/// </summary>
|
||||
public Action<ulong, ulong> OnUserInvitedToLobby;
|
||||
|
||||
/// <summary>
|
||||
/// Called when a user accepts an invitation to a lobby while the game is running. The parameter is a lobby id.
|
||||
/// </summary>
|
||||
public Action<ulong> OnLobbyJoinRequested;
|
||||
|
||||
/// <summary>
|
||||
/// Joins a lobby if a request was made to join the lobby through the friends list or an invite
|
||||
/// </summary>
|
||||
internal void OnLobbyJoinRequestedAPI( GameLobbyJoinRequested_t callback )
|
||||
{
|
||||
Join( callback.SteamIDLobby );
|
||||
if (OnLobbyJoinRequested != null) { OnLobbyJoinRequested(callback.SteamIDLobby); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
Loading…
Reference in New Issue
Block a user