Skip to content
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

[MP] Partially revert cache cleanup, track paths as fallback #94984

Merged
merged 1 commit into from
Jul 31, 2024

Conversation

Faless
Copy link
Collaborator

@Faless Faless commented Jul 31, 2024

Cleaning up remote NodePath cache is not trivial since the visibility API allows for certain nodes to be despawned (and re-spawned) on some peers while being retained in the authority.

This means that from the server point of view, the node has not changed, and the path simplification protocol won't be run again after respawning.

While we can track this information for synchronizers via the replication API, we can't easily track this information for potential child nodes that use RPCs (I'm convinced it is doable, but we need to track the whole dependency tree which would require some more complex refactoring).

This commit partially reverts some of the cache cleanup logic to always retain remote IDs, and adds a NodePath lookup fallback when the ObjectID is invalid.

Fixes #90908 (regression from #87190). For 4.2, we might instead want to playing safe card of just reverting #87190 (I greatly underestimated the side effects it could have).

Cleaning up remote NodePath cache is not trivial since the visibility
API allows for certain nodes to be despawned (and re-spawned) on some
peers while being retained in the authority.

This means that from the server point of view, the node has not changed,
and the path simplification protocol won't be run again after
respawning.

While we can track this information for synchronizers via the
replication API, we can't easily track this information for potential
child nodes that use RPCs (I'm convinced it is doable, but we need to
track the whole dependency tree which would require some more complex
refactoring).

This commit partially reverts some of the cache cleanup logic to always
retain remote IDs, and adds a NodePath lookup fallback when the ObjectID
is invalid.
@akien-mga akien-mga merged commit 019cf2b into godotengine:master Jul 31, 2024
18 checks passed
@akien-mga
Copy link
Member

Thanks!

For 4.2, we might instead want to playing safe card of just reverting #87190 (I greatly underestimated the side effects it could have).

I've done that with 3504c98.

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.

MultiplayerSynchronizer visibility results in client peer not finding cached object
2 participants