Merge pull request #58650 from lawnjelly/portals_fix_prefix_duplication

Portals - fix duplication of instanced scenes during conversion
This commit is contained in:
Rémi Verschelde 2022-03-01 19:56:20 +01:00 committed by GitHub
commit 195b7374b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2073,9 +2073,10 @@ void RoomManager::_flip_portals_recursive(Spatial *p_node) {
}
void RoomManager::_set_owner_recursive(Node *p_node, Node *p_owner) {
if (p_node != p_owner) {
if (!p_node->get_owner() && (p_node != p_owner)) {
p_node->set_owner(p_owner);
}
for (int n = 0; n < p_node->get_child_count(); n++) {
_set_owner_recursive(p_node->get_child(n), p_owner);
}