mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-01-13 15:18:07 +03:00
Fixed dispatch double callbacks when server initialized
This commit is contained in:
parent
bf60680d87
commit
b0d23eff22
@ -67,7 +67,7 @@ namespace Steamworks
|
||||
{
|
||||
try
|
||||
{
|
||||
ProcessCallback( msg );
|
||||
ProcessCallback( msg, pipe == ServerPipe );
|
||||
}
|
||||
finally
|
||||
{
|
||||
@ -79,7 +79,7 @@ namespace Steamworks
|
||||
/// <summary>
|
||||
/// A callback is a general global message
|
||||
/// </summary>
|
||||
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 );
|
||||
}
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ namespace Steamworks
|
||||
|
||||
|
||||
|
||||
internal static void InstallEvents( bool server )
|
||||
internal void InstallEvents( bool server )
|
||||
{
|
||||
Dispatch.Install<SteamNetConnectionStatusChangedCallback_t>( ConnectionStatusChanged, server );
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user