diff options
author | khairul169 <me@khairul.my.id> | 2018-06-30 17:35:51 +0700 |
---|---|---|
committer | khairul169 <me@khairul.my.id> | 2018-06-30 17:35:51 +0700 |
commit | 8e03715a5cc1590da10e9f7b78d3960152086c71 (patch) | |
tree | 49d8cc4c431935a558bd5b9ed5b7d98c8a425506 | |
parent | 3852c5f8a0b439a8c0c6e72433d6fe82e3e596de (diff) |
Fix duplicate bug
-rw-r--r-- | scene/main/node.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/main/node.cpp b/scene/main/node.cpp index 4dc7b03685..95e4029d04 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -1895,7 +1895,7 @@ Node *Node::_duplicate(int p_flags, Map<const Node *, Node *> *r_duplimap) const // Skip nodes not really belonging to the instanced hierarchy; they'll be processed normally later // but remember non-instanced nodes that are hidden below instanced ones if (descendant->data.owner != this) { - if (descendant->get_parent() && descendant->get_parent() != this && descendant->get_parent()->data.owner == this) + if (descendant->get_parent() && descendant->get_parent() != this && descendant->get_parent()->data.owner == this && descendant->data.owner != descendant->get_parent()) hidden_roots.push_back(descendant); continue; } |