Skip to content

Commit

Permalink
Update Messages.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
miwarnec authored Jan 4, 2025
1 parent 474a44b commit 2ddfdae
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Assets/Mirror/Core/Messages.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,20 @@ public struct ChangeOwnerMessage : NetworkMessage
public bool isOwner
{
get => authorityFlags.HasFlag(AuthorityFlags.isOwner);
set => authorityFlags = value ? authorityFlags | AuthorityFlags.isOwner : authorityFlags & ~AuthorityFlags.isOwner;
set => authorityFlags =
value
? authorityFlags | AuthorityFlags.isOwner
: authorityFlags & ~AuthorityFlags.isOwner;
}

// Backwards compatibility after implementing authorityFlags
public bool isLocalPlayer
{
get => authorityFlags.HasFlag(AuthorityFlags.isLocalPlayer);
set => authorityFlags = value ? authorityFlags | AuthorityFlags.isLocalPlayer : authorityFlags & ~AuthorityFlags.isLocalPlayer;
set => authorityFlags =
value
? authorityFlags | AuthorityFlags.isLocalPlayer
: authorityFlags & ~AuthorityFlags.isLocalPlayer;
}
}

Expand Down

0 comments on commit 2ddfdae

Please sign in to comment.