mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
NetworkIdentity.DirtyMasks: syntax simplified further
This commit is contained in:
parent
f730b61cb9
commit
04e875ab6c
@ -857,14 +857,17 @@ internal void OnStopLocalPlayer()
|
|||||||
if (initialState || (component.syncDirection == SyncDirection.ServerToClient && dirty))
|
if (initialState || (component.syncDirection == SyncDirection.ServerToClient && dirty))
|
||||||
ownerMask |= nthBit;
|
ownerMask |= nthBit;
|
||||||
|
|
||||||
// observers need to be considered only in Observers mode
|
// observers need to be considered only in Observers mode,
|
||||||
//
|
// otherwise they receive no sync data of this component ever.
|
||||||
// for initial, it should always sync to observers.
|
if (component.syncMode == SyncMode.Observers)
|
||||||
// for delta, only if dirty.
|
{
|
||||||
// SyncDirection is irrelevant, as both are broadcast to
|
// for initial, it should always sync to observers.
|
||||||
// observers which aren't the owner.
|
// for delta, only if dirty.
|
||||||
if (component.syncMode == SyncMode.Observers && (initialState || dirty))
|
// SyncDirection is irrelevant, as both are broadcast to
|
||||||
observerMask |= nthBit;
|
// observers which aren't the owner.
|
||||||
|
if (initialState || dirty)
|
||||||
|
observerMask |= nthBit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return (ownerMask, observerMask);
|
return (ownerMask, observerMask);
|
||||||
|
Loading…
Reference in New Issue
Block a user