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

[Net] Fix multi-peer path-only replication, optimize single peer object cache. #58400

Merged
merged 2 commits into from
Feb 21, 2022

Conversation

Faless
Copy link
Collaborator

@Faless Faless commented Feb 21, 2022

It used to check if a net_id was ever assigned to that node to detect when to send the path confirm to the remote peer.
This is wrong, because the same net_id is shared for all the remote peers, but sent one by one.

Instead we now check if it's either not assigned or if the assigned net_id is a cache ID, and in that case ensure that the remote peer has been notified.

This can be further improved by unifying the cache interface, but for now it's a fast fix to get path-only sync to work.

This PR still at least optimize the check to verify if a given (single) peer has been notified or not.

Fixes #58193

It used to check if a net_id was ever assigned to that node to detect
when to send the path confirm to the remote peer.
This is wrong, because the same net_id is shared for all the remote
peers, but sent one by one.
Instead we now check if it's either not assigned or if the assigned
net_id is a cache ID, and in that case ensure that the remote peer has
been notified.

This can be further improved by unifying the cache interface, but for
now it's a fast fix to get path-only sync to work.
It used to always cycle all the peers when checking which one needed to
be notified, now it only does that when the target is multiple (i.e.
broadcast or exclusion).
@Faless Faless added this to the 4.0 milestone Feb 21, 2022
@akien-mga akien-mga merged commit 7e9047f into godotengine:master Feb 21, 2022
@akien-mga
Copy link
Member

Thanks!

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 get_cached_object miss returning ERR_UNAUTHORIZED on server relay
2 participants