From 8b359ff6d07352a751f200768dcde6febd8e9303 Mon Sep 17 00:00:00 2001 From: MrGadget Date: Sat, 15 Feb 2020 02:33:14 -0500 Subject: [PATCH] feat: Check for client authority in CmdClientToServerSync (#1500) --- Assets/Mirror/Components/NetworkTransformBase.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Assets/Mirror/Components/NetworkTransformBase.cs b/Assets/Mirror/Components/NetworkTransformBase.cs index ebdd615f0..ea8233759 100644 --- a/Assets/Mirror/Components/NetworkTransformBase.cs +++ b/Assets/Mirror/Components/NetworkTransformBase.cs @@ -252,6 +252,9 @@ public override void OnDeserialize(NetworkReader reader, bool initialState) [Command] void CmdClientToServerSync(byte[] payload) { + // Ignore messages from client if not in client authority mode + if (!clientAuthority) return; + // deserialize payload using (PooledNetworkReader networkReader = NetworkReaderPool.GetReader(payload)) DeserializeFromReader(networkReader);