Merge branch 'vis2k:master' into master

This commit is contained in:
MrGadget 2022-01-16 00:53:30 -05:00 committed by GitHub
commit bcb0f54405
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -1251,6 +1251,9 @@ internal void ClearAllComponentsDirtyBits()
// Clear only dirty component's dirty bits. ignores components which
// may be dirty but not ready to be synced yet (because of syncInterval)
//
// IMPORTANT to clear SyncLists's changes to avoid ever
// growing changes while not having observers etc.
internal void ClearDirtyComponentsDirtyBits()
{
foreach (NetworkBehaviour comp in NetworkBehaviours)

View File

@ -1598,13 +1598,16 @@ static void BroadcastToConnection(NetworkConnectionToClient connection)
}
// clear dirty bits only for the components that we serialized
// DO NOT clean ALL component's dirty bits, because
// DO NOT clear ALL component's dirty bits, because
// components can have different syncIntervals and we don't
// want to reset dirty bits for the ones that were not
// synced yet.
// (we serialized only the IsDirty() components, or all of
// them if initialState. clearing the dirty ones is enough.)
//
// IMPORTANT to clear SyncLists's changes to avoid ever
// growing changes while not having observers etc.
//
// NOTE: this is what we did before push->pull
// broadcasting. let's keep doing this for
// feature parity to not break anyone's project.