From b14afba156eaaaeaf96c816a22661b59b6ea4e9d Mon Sep 17 00:00:00 2001 From: MrBlockers <1747505+MrBlockers@users.noreply.github.com> Date: Fri, 10 Jan 2025 19:14:22 -0500 Subject: [PATCH] Fix node cache errors on nested MultiplayerSpawner 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). --- modules/multiplayer/scene_replication_interface.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/multiplayer/scene_replication_interface.h b/modules/multiplayer/scene_replication_interface.h index cb582a2cafc..e8e0a46ec1f 100644 --- a/modules/multiplayer/scene_replication_interface.h +++ b/modules/multiplayer/scene_replication_interface.h @@ -73,7 +73,7 @@ private: HashMap peers_info; uint32_t last_net_id = 0; HashMap tracked_nodes; - HashSet spawned_nodes; + RBSet spawned_nodes; HashSet sync_nodes; // Pending local spawn information (handles spawning nested nodes during ready).