Skip to content

Fix node cache errors on nested MultiplayerSpawners #101416

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MrBlockers
Copy link
Contributor

@MrBlockers MrBlockers commented Jan 11, 2025

Resolves #91342 by changing the replication node tracking logic to use RBSet, which preserves iteration order after entries are removed.

This prevents simplify path commands from being sent to clients out of order, so that the commands for parents are received before the commands for children.

This may not be the right fix but it does fix the MRP in issue #91342 and my own personal project where I have three layers of nested spawners which were reproducing the same issue.

Looking for feedback or hoping this inspires a proper fix :)

Changes spawned_nodes to an RBSet, which preserves
insertion order after entries are removed.

This prevents simplify path commands from being
sent to clients out of order, so that the commands
for parents are recieved before the commands for
children.

This may not be the right fix (data structure, or
design).
@MrBlockers MrBlockers requested a review from a team as a code owner January 11, 2025 00:23
@Chaosus Chaosus added this to the 4.4 milestone Jan 11, 2025
@Repiteo Repiteo modified the milestones: 4.4, 4.5 Feb 24, 2025
@matmas
Copy link
Contributor

matmas commented Mar 24, 2025

I have tested it and the fix works very well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nested MultiplayerSpawner causes node not found error if a peer joins after some spawnable scenes are freed.
4 participants