You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2026-01-07 19:53:17 +00:00
remove child on despawn instead of just queue_delete
This commit is contained in:
@@ -309,6 +309,9 @@ Error SceneReplicationInterface::on_despawn_receive(int p_from, const uint8_t *p
|
||||
Error err = rep_state->peer_del_remote(p_from, net_id, &node);
|
||||
ERR_FAIL_COND_V(err != OK, err);
|
||||
ERR_FAIL_COND_V(!node, ERR_BUG);
|
||||
if (node->get_parent() != nullptr) {
|
||||
node->get_parent()->remove_child(node);
|
||||
}
|
||||
node->queue_delete();
|
||||
return OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user