Skip to content

fix: resetting the NetworkVariable dirty status at end of frame, …#2344

Merged
jeffreyrainy merged 12 commits intodevelopfrom
fix/mtt-5121-networklist-hide-remove-2
Dec 12, 2022
Merged

fix: resetting the NetworkVariable dirty status at end of frame, …#2344
jeffreyrainy merged 12 commits intodevelopfrom
fix/mtt-5121-networklist-hide-remove-2

Conversation

@jeffreyrainy
Copy link
Copy Markdown
Contributor

… even if a given NetworkVariable is not sent to any client

Also queueing NetworkShow to be done at end-of-frame, to address modified-after-shown objects.

Also changing NetworkHide so that hiding objects that would be shown at end of frame does nothing, but emit a warning.

MTT-5121
#2306

Changelog:

  • NetworkShow() of NetworkObjects are delayed until the end of the frame to ensure consistency of delta-driven variables like NetworkList.
  • Dirty NetworkObject are reset at end-of-frame and not at serialization time.
  • NetworkHide() of an object that was just NetworkShow()n produces a warning, as remote clients will not get a spawn/despawn pair.

@jeffreyrainy jeffreyrainy requested a review from a team as a code owner December 12, 2022 00:49
shouldWrite = false;
}

// The object containing the behaviour we're about to process is about to be shown to this client
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Copy Markdown
Member

@NoelStephensUnity NoelStephensUnity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@jeffreyrainy jeffreyrainy merged commit e3b837a into develop Dec 12, 2022
@jeffreyrainy jeffreyrainy deleted the fix/mtt-5121-networklist-hide-remove-2 branch December 12, 2022 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants