feat: Check for client authority in CmdClientToServerSync (#1500)

This commit is contained in:
MrGadget 2020-02-15 02:33:14 -05:00 committed by GitHub
parent 7bb80e3b79
commit 8b359ff6d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);