Skip to content

Commit

Permalink
feat: Check for client authority in CmdClientToServerSync (#1500)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrGadget committed Feb 15, 2020
1 parent 7bb80e3 commit 8b359ff
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Assets/Mirror/Components/NetworkTransformBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

This comment has been minimized.

Copy link
@paulpach

paulpach Feb 15, 2020

Contributor

Why is this here? you can't even call a command if you don't have clientAuthority, so this check would never be true

This comment has been minimized.

Copy link
@MrGadget1024

MrGadget1024 Feb 15, 2020

Collaborator

This is the component checkbox on NetworkTransform.

image


// deserialize payload
using (PooledNetworkReader networkReader = NetworkReaderPool.GetReader(payload))
DeserializeFromReader(networkReader);
Expand Down

0 comments on commit 8b359ff

Please sign in to comment.