mirror of
https://github.com/godotengine/godot.git
synced 2025-01-06 17:37:18 +08:00
Merge pull request #87186 from Faless/mp/fix_remote_sync_cleanup
[MP] Fix remote net ID cleanup
This commit is contained in:
commit
8b0c5f2fca
@ -49,11 +49,11 @@ void MultiplayerSynchronizer::_stop() {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
root_node_cache = ObjectID();
|
root_node_cache = ObjectID();
|
||||||
reset();
|
|
||||||
Node *node = is_inside_tree() ? get_node_or_null(root_path) : nullptr;
|
Node *node = is_inside_tree() ? get_node_or_null(root_path) : nullptr;
|
||||||
if (node) {
|
if (node) {
|
||||||
get_multiplayer()->object_configuration_remove(node, this);
|
get_multiplayer()->object_configuration_remove(node, this);
|
||||||
}
|
}
|
||||||
|
reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MultiplayerSynchronizer::_start() {
|
void MultiplayerSynchronizer::_start() {
|
||||||
|
@ -246,6 +246,7 @@ Error SceneReplicationInterface::on_replication_start(Object *p_obj, Variant p_c
|
|||||||
uint32_t net_id = pending_sync_net_ids[0];
|
uint32_t net_id = pending_sync_net_ids[0];
|
||||||
pending_sync_net_ids.pop_front();
|
pending_sync_net_ids.pop_front();
|
||||||
peers_info[pending_spawn_remote].recv_sync_ids[net_id] = sync->get_instance_id();
|
peers_info[pending_spawn_remote].recv_sync_ids[net_id] = sync->get_instance_id();
|
||||||
|
sync->set_net_id(net_id);
|
||||||
|
|
||||||
// Try to apply spawn state (before ready).
|
// Try to apply spawn state (before ready).
|
||||||
if (pending_buffer_size > 0) {
|
if (pending_buffer_size > 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user