Fix script being disowned

This commit is contained in:
Serhii Snitsaruk 2022-09-03 00:08:10 +02:00
parent 881b9118e4
commit 552185dc07
1 changed files with 1 additions and 1 deletions

View File

@ -85,7 +85,7 @@ void BTTask::initialize(Object *p_agent, Dictionary p_blackboard) {
}
Ref<BTTask> BTTask::clone() const {
Ref<BTTask> inst = duplicate(true);
Ref<BTTask> inst = duplicate(false);
inst->parent = nullptr;
CRASH_COND(inst->get_parent().is_valid());
for (int i = 0; i < children.size(); i++) {