diff --git a/Facepunch.Steamworks/Classes/Dispatch.cs b/Facepunch.Steamworks/Classes/Dispatch.cs index 339b65e..bfa3675 100644 --- a/Facepunch.Steamworks/Classes/Dispatch.cs +++ b/Facepunch.Steamworks/Classes/Dispatch.cs @@ -67,7 +67,7 @@ namespace Steamworks { try { - ProcessCallback( msg ); + ProcessCallback( msg, pipe == ServerPipe ); } finally { @@ -79,7 +79,7 @@ namespace Steamworks /// /// A callback is a general global message /// - private static void ProcessCallback( CallbackMsg_t msg ) + private static void ProcessCallback( CallbackMsg_t msg, bool isServer ) { // Is this a special callback telling us that the call result is ready? if ( msg.Type == CallbackType.SteamAPICallCompleted ) @@ -92,6 +92,9 @@ namespace Steamworks { foreach ( var item in list ) { + if ( item.server != isServer ) + continue; + item.action( msg.Data ); } } diff --git a/Facepunch.Steamworks/SteamNetworkingSockets.cs b/Facepunch.Steamworks/SteamNetworkingSockets.cs index c9c3ad0..21d592a 100644 --- a/Facepunch.Steamworks/SteamNetworkingSockets.cs +++ b/Facepunch.Steamworks/SteamNetworkingSockets.cs @@ -68,7 +68,7 @@ namespace Steamworks - internal static void InstallEvents( bool server ) + internal void InstallEvents( bool server ) { Dispatch.Install( ConnectionStatusChanged, server ); }