Skip to content

Commit

Permalink
Merge pull request #47 from Unity-Technologies/fix/disconnect-remote-…
Browse files Browse the repository at this point in the history
…client

fix: Fixes the function used to disconnect remote clients.
  • Loading branch information
LukeStampfli committed Apr 1, 2021
2 parents 05d8e5b + d54b6b9 commit 3f0350a
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ namespace MLAPI.Transports.PhotonRealtime
[DefaultExecutionOrder(-1000)]
public partial class PhotonRealtimeTransport : NetworkTransport, IOnEventCallback
{
private static readonly ArraySegment<byte> s_EmptyArraySegment = new ArraySegment<byte>(Array.Empty<byte>());

[Tooltip("The nickname of the player in the Photon Room. This value is only relevant for other Photon Realtime features. Leaving it empty generates a random name.")]
[SerializeField]
private string m_NickName;
Expand Down Expand Up @@ -317,7 +319,7 @@ public override void DisconnectRemoteClient(ulong clientId)
{
if (m_Client.InRoom && this.m_Client.LocalPlayer.IsMasterClient)
{
ArraySegment<byte> payload = default;
ArraySegment<byte> payload = s_EmptyArraySegment;
RaisePhotonEvent(clientId, true, payload, this.m_KickEventCode);
}
}
Expand Down

0 comments on commit 3f0350a

Please sign in to comment.