This commit is contained in:
vis2k 2022-12-04 17:03:57 -05:00
parent d5f7c4bc01
commit 5e1f17373a

View File

@ -169,6 +169,10 @@ public void SetSyncVarDirtyBit(ulong dirtyBit)
// simply reuse SetSyncVarDirtyBit for now.
// instead of adding another field.
// syncVarDirtyBits does trigger OnSerialize as well.
//
// it's important to set _all_ bits as dirty.
// for example, server needs to broadcast ClientToServer components.
// if we only set the first bit, only that SyncVar would be broadcast.
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void SetDirty() => SetSyncVarDirtyBit(ulong.MaxValue);