mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
feat: Check for client authority in CmdClientToServerSync (#1500)
This commit is contained in:
parent
7bb80e3b79
commit
8b359ff6d0
@ -252,6 +252,9 @@ public override void OnDeserialize(NetworkReader reader, bool initialState)
|
|||||||
[Command]
|
[Command]
|
||||||
void CmdClientToServerSync(byte[] payload)
|
void CmdClientToServerSync(byte[] payload)
|
||||||
{
|
{
|
||||||
|
// Ignore messages from client if not in client authority mode
|
||||||
|
if (!clientAuthority) return;
|
||||||
|
|
||||||
// deserialize payload
|
// deserialize payload
|
||||||
using (PooledNetworkReader networkReader = NetworkReaderPool.GetReader(payload))
|
using (PooledNetworkReader networkReader = NetworkReaderPool.GetReader(payload))
|
||||||
DeserializeFromReader(networkReader);
|
DeserializeFromReader(networkReader);
|
||||||
|
Loading…
Reference in New Issue
Block a user