diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2024-01-14 20:13:35 +0100 |
---|---|---|
committer | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2024-01-14 21:04:03 +0100 |
commit | 89dacb88ec57dc7c7deb72defac49b60da2e4ca6 (patch) | |
tree | 4fbcf74dd0320e15440950766292550ec59ef795 /modules/multiplayer/multiplayer_synchronizer.cpp | |
parent | 26b1fd0d842fa3c2f090ead47e8ea7cd2d6515e1 (diff) | |
download | redot-engine-89dacb88ec57dc7c7deb72defac49b60da2e4ca6.tar.gz |
[MP] Fix remote net ID cleanup
Synchronizers for spawned nodes were not correctly keeping track of the
net ID assigned by the remote, preventing the replication from
performing the proper cleanup.
This resulted in errors being thrown when sync messages were received
after despawn (which is possible due to their unreliable nature).
Diffstat (limited to 'modules/multiplayer/multiplayer_synchronizer.cpp')
-rw-r--r-- | modules/multiplayer/multiplayer_synchronizer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/multiplayer/multiplayer_synchronizer.cpp b/modules/multiplayer/multiplayer_synchronizer.cpp index 12b4ac540d..02e3a11964 100644 --- a/modules/multiplayer/multiplayer_synchronizer.cpp +++ b/modules/multiplayer/multiplayer_synchronizer.cpp @@ -49,11 +49,11 @@ void MultiplayerSynchronizer::_stop() { } #endif root_node_cache = ObjectID(); - reset(); Node *node = is_inside_tree() ? get_node_or_null(root_path) : nullptr; if (node) { get_multiplayer()->object_configuration_remove(node, this); } + reset(); } void MultiplayerSynchronizer::_start() { |