瀏覽代碼

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).
MrBlockers 6 月之前
父節點
當前提交
b14afba156
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      modules/multiplayer/scene_replication_interface.h

+ 1 - 1
modules/multiplayer/scene_replication_interface.h

@@ -73,7 +73,7 @@ private:
 	HashMap<int, PeerInfo> peers_info;
 	HashMap<int, PeerInfo> peers_info;
 	uint32_t last_net_id = 0;
 	uint32_t last_net_id = 0;
 	HashMap<ObjectID, TrackedNode> tracked_nodes;
 	HashMap<ObjectID, TrackedNode> tracked_nodes;
-	HashSet<ObjectID> spawned_nodes;
+	RBSet<ObjectID> spawned_nodes;
 	HashSet<ObjectID> sync_nodes;
 	HashSet<ObjectID> sync_nodes;
 
 
 	// Pending local spawn information (handles spawning nested nodes during ready).
 	// Pending local spawn information (handles spawning nested nodes during ready).