Selaa lähdekoodia

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 8 kuukautta sitten
vanhempi
commit
b14afba156
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  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;
 	uint32_t last_net_id = 0;
 	HashMap<ObjectID, TrackedNode> tracked_nodes;
-	HashSet<ObjectID> spawned_nodes;
+	RBSet<ObjectID> spawned_nodes;
 	HashSet<ObjectID> sync_nodes;
 
 	// Pending local spawn information (handles spawning nested nodes during ready).