diff options
Diffstat (limited to 'scene/multiplayer/scene_replication_interface.cpp')
-rw-r--r-- | scene/multiplayer/scene_replication_interface.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/scene/multiplayer/scene_replication_interface.cpp b/scene/multiplayer/scene_replication_interface.cpp index 2952512462..55266c53ad 100644 --- a/scene/multiplayer/scene_replication_interface.cpp +++ b/scene/multiplayer/scene_replication_interface.cpp @@ -49,9 +49,8 @@ void SceneReplicationInterface::make_default() { void SceneReplicationInterface::_free_remotes(int p_id) { const HashMap<uint32_t, ObjectID> remotes = rep_state->peer_get_remotes(p_id); - const uint32_t *k = nullptr; - while ((k = remotes.next(k))) { - Node *node = rep_state->get_node(remotes.get(*k)); + for (const KeyValue<uint32_t, ObjectID> &E : remotes) { + Node *node = rep_state->get_node(E.value); ERR_CONTINUE(!node); node->queue_delete(); } @@ -317,7 +316,7 @@ Error SceneReplicationInterface::on_despawn_receive(int p_from, const uint8_t *p } void SceneReplicationInterface::_send_sync(int p_peer, uint64_t p_msec) { - const Set<ObjectID> &known = rep_state->get_known_nodes(p_peer); + const RBSet<ObjectID> &known = rep_state->get_known_nodes(p_peer); if (known.is_empty()) { return; } |