File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -85,9 +85,12 @@ public abstract class NetworkBehaviour : MonoBehaviour
8585 // also note that this is a per-NetworkBehaviour flag.
8686 // another component may not be client authoritative, etc.
8787 public bool authority =>
88- isClient
89- ? syncDirection == SyncDirection . ClientToServer && isOwned
90- : syncDirection == SyncDirection . ServerToClient ;
88+ // check isServer instead of isClient, which covers host mode too.
89+ // otherwise host mode would only have authority if ClientToServer.
90+ // fixes: https://github.com/MirrorNetworking/Mirror/issues/3529
91+ isServer
92+ ? syncDirection == SyncDirection . ServerToClient
93+ : syncDirection == SyncDirection . ClientToServer && isOwned ;
9194
9295 /// <summary>The unique network Id of this object (unique at runtime).</summary>
9396 public uint netId => netIdentity . netId ;
You can’t perform that action at this time.
0 commit comments