From 10f47908fa93948b3d55be3bbf2597010bc0ec40 Mon Sep 17 00:00:00 2001 From: cxxpxr <60411087+cxxpxr@users.noreply.github.com> Date: Thu, 29 Jul 2021 16:09:15 -0400 Subject: [PATCH] Fix not being able to kick players --- UnityProject/Assets/Mirror/Examples/Tanks/Scripts/Tank.cs | 1 + .../Runtime/Transport/LRM/LRMTransport/LRMTransportOverrides.cs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/UnityProject/Assets/Mirror/Examples/Tanks/Scripts/Tank.cs b/UnityProject/Assets/Mirror/Examples/Tanks/Scripts/Tank.cs index cfda2a4..878388f 100644 --- a/UnityProject/Assets/Mirror/Examples/Tanks/Scripts/Tank.cs +++ b/UnityProject/Assets/Mirror/Examples/Tanks/Scripts/Tank.cs @@ -1,3 +1,4 @@ +using System; using UnityEngine; using UnityEngine.AI; diff --git a/UnityProject/Assets/Mirror/Runtime/Transport/LRM/LRMTransport/LRMTransportOverrides.cs b/UnityProject/Assets/Mirror/Runtime/Transport/LRM/LRMTransport/LRMTransportOverrides.cs index c1382d5..305701f 100644 --- a/UnityProject/Assets/Mirror/Runtime/Transport/LRM/LRMTransport/LRMTransportOverrides.cs +++ b/UnityProject/Assets/Mirror/Runtime/Transport/LRM/LRMTransport/LRMTransportOverrides.cs @@ -160,6 +160,7 @@ namespace LightReflectiveMirror int pos = 0; _clientSendBuffer.WriteByte(ref pos, (byte)OpCodes.KickPlayer); _clientSendBuffer.WriteInt(ref pos, relayId); + clientToServerTransport.ClientSend(0, new ArraySegment(_clientSendBuffer, 0, pos)); return true; } @@ -178,6 +179,7 @@ namespace LightReflectiveMirror int pos = 0; _clientSendBuffer.WriteByte(ref pos, (byte)OpCodes.KickPlayer); _clientSendBuffer.WriteInt(ref pos, relayId); + clientToServerTransport.ClientSend(new ArraySegment(_clientSendBuffer, 0, pos), 0); return; }